[ Video Sharing CMS v4 ] Video could not playing And how remove JW player? And embed Google Drive Video

Started by gale77,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gale77Topic starter

the first i say phpvibe is awsome!

i have problem here, when displaying youtube video its showing error loading.

see here http://siteoflife.com/video/1/barcelona-vs-getafe-4-0-all-goals-amp-highlights-08-01-2014-messi-is-back-/

althought i want remove jw player, and replace all script to embed google drive video.

like this :

Quotehttps://docs.google.com/file/d/0BzK3wndwgppHRnVjOC1aYXZkQzA/

or just insert it into script like youtube, Metacafe in the share we video.

  •  

PHPVibe A.

It's possible that that video cannot be played in other players/or on your site. Youtube let's you pick this sort of features for your videos.

For Google drive, can you paste an embed code as well? You need to request access, I'm not sure if it's possible, as Google Drive is not meant for this, and will always protect the file.

gale77Topic starter

oh sorry i missing to make it accessable by public

here is google drive embed

Quote<iframe src="https://docs.google.com/file/d/0BzK3wndwgppHRnVjOC1aYXZkQzA/preview" width="640" height="385"></iframe>

and another my question : how remove JW player script then i can play my video from youtube.

because using jw player its soo late loading on connection

  •  

PHPVibe A.

You simply have to select the youtube player under Player config in 3.4, or under configuration in 3.3

Here is your google drive embed.
http://www.videoinedit.com/video/5044/the-rise-of-hitler-full-film-/

You can paste it via iframe in admin or, to add the rule to providers do this:

open lib/class.providers.php

$hostings      = array(
              'youtube',


under add:
'docs.google.com',

final should be:

$hostings      = array(
'youtube',
'docs.google.com',
'vimeo',
'metacafe',
'dailymotion',
//etc


find:

case 'youtube':
                  $videoId = $this->getVideoId("v=", "&");


Before it add:

case 'docs.google.com':
                  $videoId = str_replace('/edit','/preview',$this->link);
                  if ($videoId != null) {
                      $embedCode .= '<iframe src="' . $videoId . '" width="' . $this->width . '" height="' . $this->height . '"  frameborder="0"></iframe>';
                  } else {
                      $embedCode = INVALID_URL;
                  }
                  break; 


final result should look like:
case 'facebook':
                  $videoId = $this->getVideoId("v=", "&");
                  if (empty($videoId)) {
                      $videoId = $this->getVideoId("v/");
                  }
                  if ($videoId != null) {
                      $embedCode .= '<iframe src="https://www.facebook.com/video/embed?video_id=' . $videoId . '" type="application/x-shockwave-flash" allowfullscreen="true" width="' . $this->width . '" height="' . $this->height . '"  frameborder="0"></iframe>';
                  } else {
                      $embedCode = INVALID_URL;
                  }
                  break;
				  case 'docs.google.com':
                  $videoId = str_replace('/edit','/preview',$this->link);
                  if ($videoId != null) {
                      $embedCode .= '<iframe src="' . $videoId . '" width="' . $this->width . '" height="' . $this->height . '"  frameborder="0"></iframe>';
                  } else {
                      $embedCode = INVALID_URL;
                  }
                  break;  
				  
              case 'youtube':
                  $videoId = $this->getVideoId("v=", "&");
                  if ($videoId != null) {
                      $choice = get_option('youtube-player');
                      if ($choice < 2) {
                          $embedCode .= "<iframe width=\"" . $this->width . "\" height=\"" . $this->height . "\" src=\"http://www.youtube.com/embed/" . $videoId . "?&amp;title=&amp;html5=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;nologo=1&amp;vq=large&amp;autoplay=1&amp;ps=docs\" frameborder=\"0\" allowfullscreen=\"true\"></iframe>";
                      } else {
					  $real_link = 'http://www.youtube.com/watch?v=' . $videoId;
					  $img = 'http://i2.ytimg.com/vi/' . $videoId . '/0.jpg';
					  $embedCode = $this->_jwplayer ($real_link,$img, thumb_fix(get_option('site-logo')));
                             }
                  } else {
                      $embedCode = INVALID_URL;
                  }
                  break;


Will look if it has any issues and add it in 3.4 final.


Similar topics (7)