It is currently Sat Oct 23, 2021 10:47 pm

All times are UTC + 5:30 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Mar 21, 2015 4:24 pm 

Joined :
Sat Mar 21, 2015 4:08 pm

Posts : 1
Hello,

First, thank you very much for this excellent player!
The only thing it's missing is the use of the "poster" element (for thumbnails) when the HTML5 player is being used.

By default, the HTML5 player uses the first image of the video file as thumbnail. Unfortunately, since almost all my videos begin on a black background, I almost always get a black thumbnail! That's why I would like to add the "poster" element to the <video> tag.

Here's the code that needs to be modified (in components\com_hdflvplayer\views\player\tmpl\playerlayout.php):

<video id="video" src="<?php echo $video; ?>" width="<?php echo $player_width; ?>" height="<?php echo $player_height; ?>" autobuffer controls onerror="failed(event)"></video>

Therefore, could someone tell me how to edit the code so that when clicking on a miniature in the component (as on this page: http://www.apptha.com/demo/hd-flv-player), the same thumbnail used for the Flash player also appears when the HTML5 player is being used?

Thank you very much for your help and support!


Report this post
Top
 Profile  
 
PostPosted: Mon Apr 20, 2015 7:33 pm 
Apptha Team

Joined :
Thu Jan 17, 2013 7:01 pm

Responses Posted : 169
Hi,

Kindly go to the below file path:

components\com_hdflvplayer\views\player\tmpl\playerlayout.php

Find this code

if ($details['rs_title']->filepath == "Url") {
$video = $details['rs_title']->videourl;

} else {
$current_path = "components/com_hdflvplayer/videos/";
$video = JURI::base() . $current_path . $details['rs_title']->videourl;

}


and replace into

if ($details['rs_title']->filepath == "Url") {
$video = $details['rs_title']->videourl;
$previewURL = $details['rs_title']->previewurl;
} else {
$current_path = "components/com_hdflvplayer/videos/";
$video = JURI::base() . $current_path . $details['rs_title']->videourl;
$previewURL = JURI::base() . $current_path .$details['rs_title']->previewurl;
}

And also please add the poster attribute in the video tag like below:

<video id="video" src="<?php echo $video; ?>" poster ="<?php echo $previewURL ;?>" width="<?php echo $player_width; ?>" height="<?php echo $player_height; ?>" autobuffer controls onerror="failed(event)">
Html5 Not support This video Format.
</video>


If you have any queries please feel free to post here.

Regards,
Powya SP.


Report this post
Top
 Profile  
 
PostPosted: Tue Apr 21, 2015 8:28 pm 

Joined :
Sat Mar 21, 2015 4:08 pm

Posts : 1
Perfect!
Thank you very much!


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 5:30 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron