[ Video Sharing CMS v4 ] HTML5 video tag to phpvibe use VideoJS

Started by lienkhuong,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lienkhuongTopic starter

Hi @Alexander

in Add embed code (Embed/Iframe) I want to add HTML5 video tag to phpvibe use videojs

ex:
<video id="example_video_1" class="video-js vjs-default-skin"
  controls preload="auto" width="640" height="264"
  poster="http://video-js.zencoder.com/oceans-clip.png"
  data-setup='{"example_option":true}'>
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video>

Can phpvibe do it?
Thank
  •  

lienkhuongTopic starter

i add this tag but error "No video with supported format and mime type found"
  •  

PHPVibe A.

Hi, You'll need to call the js files for videojs also.

com/com_video.php
     /com_embed.php

Try this:

Change:

//VideoJS
if((get_option('remote-player',1) == 6) || (get_option('choosen-player',1) == 6)|| (get_option('youtube-player',1) == 6))	{					 
add_filter( 'addplayers', 'vjsup' );  
}

to


//VideoJS
	 
add_filter( 'addplayers', 'vjsup' ); 

lienkhuongTopic starter

Hi @Alaxender

i found this error, don't need change code

because tag:
...
data-setup='{"example_option":true}'>
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
...
after save, i view page source then it change

http://prntscr.com/7l11ku

--> ' change to "&#039;"
please fit it

Thank!
  •  

lienkhuongTopic starter

Hi @Alaxender
i found this error, don't need change code
because tag:
...
data-setup='{"example_option":true}'>
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
...
after save, i view page source then see it change ' to "&#039;"
http://prntscr.com/7l11ku
I edit in phpmyadmin so play ok however not support responsive with this tag
please fix it

Or you can edit phpvibe allow type link: https://redirector.googlevideo.com/videoplayback?requiressl=yes&id=f3c274c14bcb5c90&itag=18&source=picasa&cmo=secure_transport%3Dyes&ip=0.0.0.0&ipbits=0&expire=1437700993&sparams=requiressl,id,itag,source,ip,ipbits,expire&signature=B4E2EC012A7B35AC0623CE41D5D5CA4B090B34CD.71AD30089B27ACD041CA6AF9DD62582D7CD935FB&key=lh1
example allow this link: http://kidstube.vn/test.html
Thank!
  •  

PHPVibe A.

If you change that it will break other type of iframe embeds, because this is the thing.
Why not just use remote video (link to mp4) and select videojs as player?

lienkhuongTopic starter

Quote from: Alexander on
If you change that it will break other type of iframe embeds, because this is the thing.
Why not just use remote video (link to mp4) and select videojs as player?

*  why ' change to "&#039;" ? so it can't play

* I know link mp4 this is the best solution but have to buy server. very costly so i want use this link

Thank
  •  

lienkhuongTopic starter

@Alexander

1. Solved: change ' to ".
Vdeojs not show button play, it only show when drag mouse in player and and not support responsive when use tag videojs. You can help me this issue (Ex: http://kidstube.vn/test/1632/)

2. with link mp4 this is the best solution but have to buy server. very costly so i want use this link

Thank
  •  

PHPVibe A.

Hmm, what I see there is that the js that makes videojs responsive is missing in the page source ( I assume you didn't use what I told you).

If you don't hide the link, you can link to the mp4 from another server with no problem, not sure what you are saying about buying a new server, it only uses your bandwidth if you use the hide path (read through php).

lienkhuongTopic starter

Quote from: Alexander on
Hmm, what I see there is that the js that makes videojs responsive is missing in the page source ( I assume you didn't use what I told you).

If you don't hide the link, you can link to the mp4 from another server with no problem, not sure what you are saying about buying a new server, it only uses your bandwidth if you use the hide path (read through php).
Hi Alexander
I changed code (com_video.php and com_embed.php)
//VideoJS
if((get_option('remote-player',1) == 6) || (get_option('choosen-player',1) == 6)|| (get_option('youtube-player',1) == 6))	{					
add_filter( 'addplayers', 'vjsup' ); 
}

to
add_filter( 'addplayers', 'vjsup' );


but it still not support responsive (http://kidstube.vn/test/1632/)
  •  

PHPVibe A.

Can you explain what you did? Since you don't pull the default videojs structure from PHPVibe.
You can check in lib/class.providers.php the video js embed function, it has a big chunk of javascript from us which makes it adaptive, it has no connection with the code you've changed.
Or you can look in the page source of a video played trough videojs (our embed)

lienkhuongTopic starter

  •  

lienkhuongTopic starter

Hi @Alexander
i founded this issue for embed videojs responsive.
==>: http://prntscr.com/7neo0w
Please help me add this script

Thank
  •  

PHPVibe A.

Ok, what I don't understand is why would you use the iframe when you already have a link to the mp4?
You can use remote video option in admin and choose videojs (like you did for remote videos).
This is what I don't understand, why you struggle to bypass something that it's already built into the script?

lienkhuongTopic starter

Hi Alexander
thank for answer. mp4 link in my example this in only demo. i want to use iframe for another link, because this link not allow in phpvibe (remote link). my link to use only can play iframe use videojs so i want to this iframe.

Another link: https://redirector.googlevideo.com/videoplayback?requiressl=yes&id=f3c274c14bcb5c90&itag=18&source=picasa&cmo=secure_transport%3Dyes&ip=0.0.0.0&ipbits=0&expire=1437700993&sparams=requiressl,id,itag,source,ip,ipbits,expire&signature=B4E2EC012A7B35AC0623CE41D5D5CA4B090B34CD.71AD30089B27ACD041CA6AF9DD62582D7CD935FB&key=lh1
example allow this link: http://kidstube.vn/test.html

Thank
  •  

PHPVibe A.

Then add the videojs responsive code to :

com/com_video.php

//Check if has embed code
	$embedvideo	=  render_video(stripslashes($video->embed));


Under


$embedvideo .= '
	<script type="text/javascript">
var myPlayer = _V_("#currentvideo");
function resizeVideoJS(){
var containerWidth = $(\'.video-player\').width();
var videoHeight = Math.round((containerWidth/16)*9);
// Set width to fill parent element, Set height
myPlayer.width(containerWidth).height( videoHeight );
}
resizeVideoJS();
window.onresize = resizeVideoJS;
 </script>
	';


Didn't test it, but this is what I think (Javascript is not really my thing, php coder :) )

lienkhuongTopic starter

  •  

wolftbpg

  •  

PHPVibe A.

Quote from: wolftbpg on
how soon put in videojs player ?

:confused: videojs is available since 6 months ago

wolftbpg

  •  

PHPVibe A.

Quote from: wolftbpg on
as add logo on videojs .
so this error
https://github.com/Mewte/videojs-logobrand

I haven't tried that.
But, you can play with the videojs embed in lib/class.providers.php

wolftbpg

  •  

wolftbpg

I liked the videojs in phpvibe , it is the fastest and light melhor.é only has the logo of the problem.
  •  

Marius P.

Quote from: wolftbpg on
I liked the videojs in phpvibe , it is the fastest and light melhor.é only has the logo of the problem.

Videojs has no logo support by default, but as I know plugins exist for this.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

wolftbpg

  •  

Marius P.

Quote from: wolftbpg on
Can you help me put the logo ?

When I'll have time to test, I will provide a tutorial.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

wolftbpg

  •  

wolftbpg

  •  

wolftbpg

como adicione botao de seleção de qualidade de video no videojs?
  •  

Similar topics (7)

Replies: 0
Views: 786

Replies: 30
Views: 7609

Replies: 0
Views: 684

Started by tweky94


Replies: 0
Views: 1150