Results 1 to 9 of 9

Thread: JW player, youtube and iPhones

  1. #1
    VidBB is offline vBTubePRO-User BF
    Join Date
    Feb 2010
    Posts
    26

    Default JW player, youtube and iPhones

    I have the JW player plugin installed on a blog of mine. It is not html5, but the video is playable on my iphone.

    Earthquake Immediate Aftermath On the Ground in Port-au-Prince, Haiti « HitFound.com

    How do I change the player and/or the code so it works like that?

    I took a look at the code in the plugin, check it out.

    Code:
    // designed to show YouTube Video on his embed code for iPhone devices
    				if(!empty($this->flv) && $this->isYouTubeURL(urldecode($this->flv))){
    					$ytid = $this->getYouTubeID(urldecode($this->flv));
    					$this->fixmobilestyle = false;
    					echo "\n<style type=\"text/css\">\n.post object,.post embed{width:100% !important;height:auto;position:relative;z-index:0;}\n</style>\n";
    					return $this->genYouTubeEmbed($ytid);
    				}else{
    					$last_object = __('(Video: Available only on a desktop browser)', 'stream-video-player');
    				}
    			}
    		}else{
    			$image_obj = (empty($this->image))?'':' data="'.$this->image.'"';
    			$image_param = (empty($this->image))?'':'<param name="src" value="'.$this->image.'"/>';
    			$last_object='<!--[if !IE]>--><object type="video/mp4"'.$image_obj.$width.$height.'>'."\n".
    				'<param name="controller" value="false"/>'."\n".
    				'<param name="target" value="myself"/>'."\n".
    				'<param name="href" value="'.$this->mp4.'"/>'."\n".
    				$image_param."\n".
    				'<!--<![endif]-->';
    				if(!$this->mobile){
    					$last_object .= $this->message;
    				}else{
    					$last_object .= __('(video)', 'stream-video-player');
    				}
    				$last_object .= '<!--[if !IE]>-->'.
    				'</object>'.
    				'<!--<![endif]-->'.
    				"\n";
    		}
    This is a very simple plug-in for wordpress so we should be able to make it work with this script. It doesn't involve HTML 5 or anything special, just a regular youtube link.

    Here is a screenshot of what it looks like on my iphone.

    Last edited by VidBB; 17-05-2011 at 05:30.

  2. #2
    s7v7n's Avatar
    s7v7n is offline Administrator
    Join Date
    Jan 2008
    Posts
    8,108

    Default

    Thanks for this.
    Kind Regards
    s7v7n

    Please use only original and licensed copies of vBTubePRO. Only legal installations will guarantee you support and updates.

  3. #3
    VidBB is offline vBTubePRO-User BF
    Join Date
    Feb 2010
    Posts
    26

    Default

    Bump, is there a way to at least generate the link for youtube? So for example, I can use the VBtube flash player, and below add a link to youtube?

  4. #4
    demo7up is offline vBTubePRO-User BF
    Join Date
    Jun 2009
    Posts
    90

    Default

    Bump!!!!! This is good!!!

  5. #5
    s7v7n's Avatar
    s7v7n is offline Administrator
    Join Date
    Jan 2008
    Posts
    8,108

    Default

    We should wait for a stable solution from longtailvideo / jwplayer.
    Kind Regards
    s7v7n

    Please use only original and licensed copies of vBTubePRO. Only legal installations will guarantee you support and updates.

  6. #6
    VidBB is offline vBTubePRO-User BF
    Join Date
    Feb 2010
    Posts
    26

    Default

    Quote Originally Posted by s7v7n View Post
    We should wait for a stable solution from longtailvideo / jwplayer.
    In the meantime I came up with an easy solution. All it requires is a simple modification on the vbtube_functions PHP file.

    Put the flash player in an open DIV container, make the image of the background on the DIV player using the ''.$url.'" tag. So, it would be "http://img.youtube.com/vi/'.$url.'/hqdefault.jpg for example. Then make the image a URL going to the youtube link.

    When loading on an iphone it works like a charm. It shows the background image and when you click it opens up the youtube player, when you close out of the video it goes back to your site.

    On desktops you can't see anything since if your computer supports flash it will have the player over the DIV background.

  7. #7
    VidBB is offline vBTubePRO-User BF
    Join Date
    Feb 2010
    Posts
    26

    Default

    To take a step further you can use relevant position tags and put a transparent play logo over the image.

  8. #8
    dacho is offline vBTubePRO-User BF
    Join Date
    Oct 2010
    Posts
    55

    Default

    Quote Originally Posted by s7v7n View Post
    We should wait for a stable solution from longtailvideo / jwplayer.
    There is a solution from longtailvideo for HTML5, It's not stable ?
    JW Player: Download | LongTail Video | Home of the JW Player

  9. #9
    s7v7n's Avatar
    s7v7n is offline Administrator
    Join Date
    Jan 2008
    Posts
    8,108

    Default

    It is stable but youtube is not working with it. Only own hosted videos....
    Kind Regards
    s7v7n

    Please use only original and licensed copies of vBTubePRO. Only legal installations will guarantee you support and updates.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •