I upload a video to google photo.
I use jwplayer to play video. but I can't seek video.
When I click to seek video, video is replay with start time 00:00.
This is my code
player = jwplayer("apicodes-player");
player.setup({
playlist: [
{ sources: [{
label: "360p",
type: "video/mp4",
file: "https://video-downloads.googleusercontent.com/AMfe5wrawK220JrFOrFTfUGIbTtgk_MNzkCa3xGjrNyqCPODbSRcnm8JYAginZRK3VRcEM46ogfCAQzG2n3aly0zn9JQKy0mWx5z1YeNfwsIlUZwh-w_UeTV1xfBiRj6Wt246t5xt1m_lEoL6Ed5W8vptAG4t-3QhG5jqFTdNMJUZWsX8vaBeW_AxM0LGYtihXYZm9r-7aki"
}]},
],
aspectratio: "16:9",
startparam: "start",
primary: "html5",
ga: {},
playbackRateControls: true,
autostart: false,
preload: "auto"
});
I tried demo with https://www.jwplayer.com/developers/player-event-inspector/ but it doesn't not working with seek and rewind.
Json input test is:
{
playlist: [{
sources: [{
label: "360p",
type: "video/mp4",
file: "https://video-downloads.googleusercontent.com/AMfe5wrawK220JrFOrFTfUGIbTtgk_MNzkCa3xGjrNyqCPODbSRcnm8JYAginZRK3VRcEM46ogfCAQzG2n3aly0zn9JQKy0mWx5z1YeNfwsIlUZwh-w_UeTV1xfBiRj6Wt246t5xt1m_lEoL6Ed5W8vptAG4t-3QhG5jqFTdNMJUZWsX8vaBeW_AxM0LGYtihXYZm9r-7aki"
}]
}, ],
"width": "50%",
"aspectratio": "16:9",
"autostart": false,
"controls": true,
"preload": "metadata",
"primary": "html5"
}
Please help me.
I have the same problem. I think this is because the Google Photos server does not support partial content responses. See HTML5 Video Tag in Chrome - Why is currentTime ignored when video downloaded from my webserver? and https://issuetracker.google.com/issues/111931138.
One option would be to download the video from your server and control de streaming yourself.
Related
I need to autoplay from a play list. When a song ends it should automatically play the next song in the play list. How can I do this? Please help.
$(document).ready(function() {
projekktor('#player_a', {
poster: 'media/intro.png',
title: 'this is projekktor',
playerFlashMP4: 'swf/StrobeMediaPlayback/StrobeMediaPlayback.swf',
playerFlashMP3: 'swf/StrobeMediaPlayback/StrobeMediaPlayback.swf',
width: 640,
height: 385,
enableTestcard: true,
autoplay: true,
playlist: [{
0: {
src: "1.mp4",
type: "video/mp4"
},
1: {
src: "2.mp4",
type: "video/mp4"
},
3: {
src: "3.mp4",
type: "video/mp4"
}
}]
}, function(player) {} // on ready
);
});
Recommended to use a 3rd party jquery plugin
Example
https://github.com/brightcove/videojs-playlist
http://videojs.com/
I was using JWPlayer 5, but right now moving to JWPlayer 6.
On JWPlayer support page you can see that playlist have time duration for each video, but I don't see duration in play list with a code below.
<script type="text/javascript">
jwplayer("summitplayer").setup({
height: 1080,
width: 640,
listbar: {
position: 'bottom',
size: 720
},
playlist: [
{ duration: 488, title: "My title #1", description: "Description #1", file: "file1.mp4", image: "file1.png" },
{ duration: 488, title: "My title #2", description: "Description #2", file: "file2.mp4", image: "file2.png" }
]
});
</script>
I am not afraid of using a particular skin or creating a skin for player, but I don't see the option for duration either.
I would like to setup jwplayer with various streaming protocols, for flash/pc/mac and for html5 player for hls capable-device and at the end with a fallback link that that for old android and blackberyy device. That's working fine with a static code. But I would like to change dynamically the player scr onclick for different streaming quality.
I have this script (in the header also) to change dynamically the player source onclick:
<script type="text/javascript">
function changeVideo(filename1,filename2,filename3) {
jwplayer("myplayer").setup({
autostart: true,
autoplay: true,
width: 640,
height: 360,
aspectratio: "16:9"
playlist: [{
image: "/images/poster.jpg",
sources: [{
file: filenam1
},{
file: filenam2
},{
file: filenam3,
}]
}],
primary: "flash"
});
jwplayer('myplayer').load();
}
</script>
filaname1, filename2, filename3 are variables which listen to the html/js onchange fonction which also has 3 links separated with a "," .
And in the body I have this:
<div id="myplayer">Loading the player...</div>
//this is the default static player setup which is working fine
<script>
jwplayer("myplayer").setup({
aboutlink: "http://mywebsite.com",
autostart: true,
width: 768,
height: 432,
aspectratio: "16:9",
playlist: [{
image: "/images/poster.jpg",
sources: [{
file: "rtmp://servername-or-ip:1935/appname/streamname"
},{
file: "http://servername-or-ip:1935/appname/streamname/playlist.m3u8"
},{
file: "rtsp://servername-or-ip:1935/appname/streamname"
}]
}],
primary: "flash"
});
</script>
// here are the quality links to change dynamically onlick, with three links
<p><a class="button" href="javascript:void();" onclick="javascript:changeVideo('rtmp://servername-or-ip:1935/appname/streamname1,http://servername-or-ip:1935/appname/streamname1/playlist.m3u8,rtsp://servername-or-ip:1935/appname/streamname1');">Low Quality</a>
<a class="button" href="javascript:void();" onclick="javascript:changeVideo('rtmp://servername-or-ip:1935/appname/streamname2,http://servername-or-ip:1935/appname/streamname2/playlist.m3u8,rtsp://servername-or-ip:1935/appname/streamname2');">SD Quality</a>
<a class="button" href="javascript:void();" onclick="javascript:changeVideo('rtmp://servername-or-ip:1935/appname/streamname3,http://servername-or-ip:1935/appname/streamname3/playlist.m3u8,rtsp://servername-or-ip:1935/appname/streamname3');">HD Quality</a>
</p>
If there someone to help? that would be greatly appreciated.
I am using Jwplayer 6 Ad version for both flash as well as html5 player where
flash player is working fine as well as pre-roll ads are coming but IOS/Android devices support Html5 player where pre-roll ads are displaying.
Player Configuration Support Link: http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/22644/using-the-html5-video-tag/
Issue: Pre-roll ads are not coming while playing videos on various IOS/Andriod devices in html5 player.
<script src='/jwplayer/jwplayer.js'></script>
<div id='vidShow' style='text-align:center'></div>
<video height='388' width='658' id='vidShow' autoplay autobuffer controls>
<source src='$videoURL' type='video/mp4'></video>
<script type='text/javascript'>
jwplayer.key='ZntNkhG6CqNXBkJnV4sYqVjYopC38oGcp0GjCQ==';
jwplayer('vidShow').setup({
modes: [
{ type: 'html5' },
{ type: 'flash', src: '/jwplayer/jwplayer.flash.swf' },
advertising: {
client: 'vast',
schedule: {
myPreroll:
{
offset: 'pre',
tag: 'http://xp1.zedo.com/jsc/c2/fns.vast?n=2135__amp__c=121/102__amp__d=22__amp__s=1__amp__v=vast2__amp__pu=__page-url____amp__ru=__referrer____amp__pw=__player-width____amp__ph=__player-height____amp__z=__random-number__'
}}}]
});
</script>
Use... JW PLAYER v6.8+ (Working)
<div id="mediabox_video" style="width:100%; height:100%;">Loading...</div>
<script type="text/javascript">
jwplayer("mediabox_video").setup({
width: '100%',
height: '100%',
autostart: true,
playlist: [{
sources: [
{bitrate: "360", file: "http://110.164.180.149/video39/1930daa7bced9bcbfb8131af6e8a34fb/5320014b/2014/03/11/1394544732/1394544732_360.mp4", label: "360p", type: "video/mp4", provider: "video"},
{bitrate: "480", file: "http://110.164.180.149/video39/bf9b55c3f9c3b71291e3c09aff6ba4ae/5320014b/2014/03/11/1394544732/1394544732_480.mp4", label: "480p", type: "video/mp4", provider: "video"},
]
}],
advertising: {
client: "vast",
schedule: {
adbreak1: {
offset: 'pre',
tag: 'http://xp1.zedo.com/jsc/c2/fns.vast?n=2135__amp__c=121/102__amp__d=22__amp__s=1__amp__v=vast2__amp__pu=__page-url____amp__ru=__referrer____amp__pw=__player-width____amp__ph=__player-height____amp__z=__random-number__'
}
}
}
});
</script>
jwplayer("mediaplayer").setup({
provider: 'http',
file: encodeURI(JWplayer_top_video_path),
image: "http://vod.hkheadline.com/hkheadline/instant_video/2013/0103/6beae821acd0eaf1d59e0daa974f5836.jpg",
//Player for IE,FF,Chrome
flashplayer: "./js/jwplayer/player.swf",
//Skin for IE,FF
skin: "./js/jwplayer/skin/glow.zip",
wmode: "opaque",
width: 650,
height: 390,
stretching: "uniform",
autostart: "false",
autopreloading: "true",
dock: "true",
bufferlength: 10,
plugins: {
// fbit: {enable: true},
// tweetit: {enable: true},
"gapro-2":{
"trackstarts": true,
"trackpercentage": true,
"trackseconds": true,
"tracktime": true
}
},
modes: [
{ type: "html5",
//Skin for Chrome
config: {skin: "./js/jwplayer/skin/glow/glow.xml"}
},
{ type: "flash", src: "./js/jwplayer/player.swf" }
],
'events': {
onComplete: function(e){
$('#mediaplayer').remove();
close_overlay();
}
}
});
The above code is the setup jwplayer. It works perfectly on chrome, fx, safari , but not in IE8. In Ie 8 the player is shown and I can click on the play button, However, it keeps loading and loading but never play the movie, how to fix the problem ?thanks