trashfake
Forum Replies Created
-
Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgradeJust have the information JW6 does not like Facebook…
No Og tags, so impossible to read video embedded with jwplayer6 in facebook.What a disappointment! ??
Do you plan to put back this feature someday on JW6?
Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgrade@jeroen
it works : YOU’RE THE BOSS!!Sorry for this dumb coding…
Woohoo now I only need to add -x360, -x720, or -x1080 at the end of filenames to have quality implemented automatically in WordPress : what a relief! One media, several qualities : perfect.
Many many thanks and best regards
Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgradeHey Jeroen
Here is the link : https://www.lepetitcowboy.com/elizabethgerma/test-jwplayer/
You’ll see the player does not show.
In other pages of the website it works since I did not add any file with different sources.Many Thanks
Regards
Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgradeHey Jeroen,
Sorry to ask but did you see there was a question in my post?
??
Many thanks again
Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgradeThanks a lot in advance!
Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgradeHi Jeroen
Here is what I did in jwp6-class-player.php to manage multiple sources and it worked till plugin 2.0.3. Even if I know it’s not a very optimised code :), it was good enough for my purpose.
public function embedcode($id, $file = null, $playlist=null, $image = null, $config = null) { // overwrite existing config with additional config from shortcode. if ( ! is_null($config) ) { foreach ($config as $param => $value) { $this->set($param, $value); } } unset($this->config['description']); //$image = ( is_null($image) ) ? JWP6_Plugin::default_image_url() : $image; $embedcode = " <div class='jwplayer' id='jwplayer-{$id}'></div> <script type='text/javascript'> "; if ( get_option(JWP6 . 'allow_anonymous_tracking') ) { $embedcode .= $this->_tracking_code($id); } $embedcode .= " jwplayer('jwplayer-{$id}').setup({ "; $embedcode .= $this->_add_embedcode_params($this->config); if ( ! is_null($image) ) { $embedcode .= "'image': '{$image}',\n"; } if ( ! is_null($file) && is_null($playlist) ) { $filesTemp = explode("x360.mp4", $file); if ($filesTemp[0] != $file) { $files["360"] = $file; $embedcode .= "'sources':[\n"; $embedcode .= "{'file':'$file', 'label':'360p'},\n"; if($this->remote_file_exists("$filesTemp[0]x720.mp4")) { $embedcode .= "{'file':'$filesTemp[0]x720.mp4', 'label':'720p'},\n"; } if($this->remote_file_exists("$filesTemp[0]x1080.mp4")) { $embedcode .= "{'file':'$filesTemp[0]x1080.mp4', 'label':'1080p'}]\n"; } } else { $embedcode .= "'file': '{$file}'\n"; } } if ( ! is_null($playlist) ) { $embedcode .= "'playlist': {$playlist}\n"; } $embedcode .= " }); </script> "; return $embedcode; } // Test function for distant file public function remote_file_exists($url) { ini_set('allow_url_fopen', '1'); if(@fclose(@fopen($url, 'r'))) return true; else return false; }
But since 2.0.5 it does not work : I tried this in vain
public function embedcode($id, $file = null, $playlist=null, $image = null, $config = null) { if ( ! is_null($config) ) { foreach ($config as $param => $value) { $this->set($param, $value); } } $params = $this->_embed_params(); if ( $image ) { $params['image'] = $image; } if ( $file && ! $playlist ) { if ( $this->get('streamer') ) { $file = $this->get('streamer') . $file; } if ( "/" == substr($file, 0, 1) ) { $protocol = ( is_ssl() ) ? "https://" : "https://"; $file = $protocol . $_SERVER['SERVER_NAME'] . $file; } // Comment out the line below if you are using relative urls to the page (officially not supported) // if ( ! strpos($file, "://") ) $file = site_url() . "/" . $file; $filesTemp = explode("x360.mp4", $file); if ($filesTemp[0] != $file) { $files["360"] = $file; $sources = "\"["; $sources .= '{"file":"'.str_replace("\"", "", json_encode($file)).'", "label":"360p"}'; if($this->remote_file_exists("$filesTemp[0]x720.mp4")) { $sources .= ',{"file":"'.str_replace("\"", "", json_encode($filesTemp[0])).'x720.mp4", "label":"720p"}'; } if($this->remote_file_exists("$filesTemp[0]x1080.mp4")) { $sources .= ',{"file":"'.str_replace("\"", "", json_encode($filesTemp[0])).'x1080.mp4", "label":"1080p"}]"'; } } else { $params['file'] = $file; } } else if ( $playlist ) { $params['playlist'] = $playlist; } $embedcode = "<div class='jwplayer' id='jwplayer-{$id}'></div>"; // $embedcode .= "<pre>" . json_encode($params) . "</pre>"; $embedcode .= "<script type='text/javascript'>"; if ( get_option(JWP6 . 'allow_anonymous_tracking') ) { $embedcode .= $this->_tracking_code($id); } if ($sources) { $embedcode .= "jwplayer('jwplayer-{$id}').setup(" . str_replace("&", "&", json_encode($params)) . ",\"sources\":$sources);\n"; } else { $embedcode .= "jwplayer('jwplayer-{$id}').setup(" . str_replace("&", "&", json_encode($params)) . ");\n"; } $embedcode .= "</script>"; return $embedcode; } }
So could you please help me find what’s wrong?
Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgradeAnother thing I saw (unless I did something wrong) is that this new plugin does not add meta properties to embed jwplayer in facebook.
Did something changed about that?
Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgradeI have several MP4 files in different qualities. My point is to have a user-friendly interface to manage that. With JW5 Player I customized the code in order to have another field called HD File where I linked to another media in WordPress media library.
A better use could be to have several files with the quality in the name, so the plugin could be able to find automatically the different files when adding a new media.
For example, if you have a media which name is video-360.mp4, the plugin would search for video-xxxx.mp4 in the same directory to find other qualities. This way, it would be so simple to handle quality without having to manage it via the WordPress interface!
Same thing for captions, we could have a video-en.srt, video-fr.srt, etc…Forum: Plugins
In reply to: [JW Player for Flash & HTML5 Video] why upgradeI agree with the above posts : I ordered JW Player 6 premium and I’m a bit disappointed too.
I ordered a bit too quickly, I should have better read comments on this new player since I thought quality was really managed in wordpress not in a script way but with a user friendly wordpress interface.
So I have to do the same thing I did on JW5, change code to add special fields to handle quality and update my code in new version each time there is a new one.
Other thing, with JW5 everything was ok, in flash or HTML5. But now I have some mp4 files that stutter in HTML5.
So now I’m losing some features but I have to pay each year : what a deal.