JWPlayer : issue in stop and play using javascript - javascript

I am using jwplayer to play videos on my site. I want to implement this scenario :
A small thumb nail image represent the video.
when a user click on the thumb image the jwplayer div shows and starts to play and the thumb image will hide .
An external close button will allow to close the video. Then the thumb image will show again.
I am trying to accomplish it by using js.
The following is used to play the video:
jwplayer('container').play();
and this is used to stop the jwplayer:
jwplayer('container').stop();
The functions are working in chrome . But in firefox when I try to play the video in second time the jwplayer is in BUFFERING state. Also revert back to the placeholder image.
also shows an error sometime in console
Error: Permission denied to access property 'toString'
This is a sample jsfiddle demo
http://jsfiddle.net/35bGW/
Please help me to find a solution for this.
Thanks

YouTube now defaults to HTML5 mode as primary in 6.9.
There are some issues with setting up the player again with YouTube in HTML5 mode.
I have reported this as an issue to the player team here.
A work around, for now, is in your code, under this line:
stretching: 'exactfit',
Add:
primary: 'flash',
This should work around the issue for the time being.

Related

Brightcove video freezes in Fancybox

I've been experiencing issues with multiple Brightcove videos freezing at :19 seconds when played through Fancybox. Here is an example: https://jsfiddle.net/qrqwy0qt/1/
Steps to reproduce:
Click the 'Play Video in Fancybox' button
Watch the video play through correctly
Refresh the page, or click 'Run' in jsfiddle
Play the video again in Fancybox, watch it freeze at :19 seconds.
Wait about a minute and the video shows "Could not download the video. Error code: PLAYER_ERR_TIMEOUT" and the following error is shown in the console:
VIDEOJS: ERROR: (CODE:-2 undefined) i {code: -2, type: "PLAYER_ERR_TIMEOUT", message: ""}
h # index.html?videoId=5002405584001&autoplay=1:1300
g.error # index.html?videoId=5002405584001&autoplay=1:1300
b # index.html?videoId=5002405584001&autoplay=1:1307
db # index.html?videoId=5002405584001&autoplay=1:1297
(anonymous function) # index.html?videoId=5002405584001&autoplay=1:1308
This doesn't appear to happen when the video is embedded on the page normally, which you can also see in the jsfiddle.
Additionally, with certain video players you can even see the issue forming in the buffer progress bar:
Video Progress Bar Image
You can see the color change on the progress bar right at :19 seconds. The video seems to have issues loading content after this point unless you manually seek beyond that point.
I've also had this issue using other lightboxes such as Brightcove's modal. Can anyone help me find a fix for this?
Update:
It seems the issue only occurs when the video height is over 270px, excluding the "letter-box" of the video player. You can test this with the following CSS properties:
.fancybox-inner{
max-height:270px; // No freezing issue
//min-height:275px; // Results in freezing
}
This isn't really a permanent solution because it prevents responsiveness on larger resolutions, but hopefully this information can bring us closer to a real solution.
Could you specify the browser? I tested it on Firefox and Chrome and works fine.

After video plays show another video in its place (Vimeo)

I am looking to have a video play once the first video ends. Both videos are coming from Vimeo. I have attempted to use this plugin and follow the Vimeo API however I can't seem to get anywhere. The plugin successfully plays one video after the other but the video loads next to it, not in place of it. I've also tried the suggestion on this post but it doesn't work for me either.
Any suggestions? I'm beginner level for Javascript so the more detail the better :) thank you!

Soundmanager 2: All buttons working except for 'Play' when streaming from Soundcloud

I have a site that's using Soundmanager 2 to steam music using Soundcloud.
Everything seems to be working fine, with the exception of the play button (in the footer). If the user presses 'Previous' or 'Next', sound will play with no issues and the 'Pause' / 'Play' buttons will function perfectly. It's essentially the play button not playing sound when freshly loaded.
You can view the site here: http://socialscar.plastiqueband.com
A link to the jQuery can be found here in /static/js/application.js
The player functions can be found on lines 1032 - 1044 of the homepage source code.
This code is based entirely from this working example: soundcloud-sm2.heroku.com, only changing the Client ID and Soundcloud URL where appropriate, so I'm totally out of ideas for why this isn't working.
If anyone has any ideas, I'd be so grateful.
Okay, seems this is now fixed. Line 156 of application.js should have been
$('.tracks li:first').click();
instead of
$('li:first').click();
Knew is would be something very simple :)

youtube thumbnail using paused videos

I'm trying to make a web-app in which people can remix youtube videos...
I looked at the youtube api, and it doesn't seem to support thumbnail at a specific location.
So, I'm trying to create multiple chromeless youtube videos, start them at specific positions and stop them almost immediately to make them seem like "thumbnails".
However, the videos all show up black when I try to do so.
Here's the link to the source code: http://pastebin.com/6Bpr1Dsz
Note that when I comment out the pauseVideo part, the videos play fine.
ps: I tried to make this work on jsfiddle, but it wouldn't work.
Thanks :)

OKVideo: Controlling Video Playback with Links

Plugin Reference: http://okfoc.us/okvideo/ | https://github.com/okfocus/okvideo
Hey Guys,
I've been trying to get my links to control which video plays with the OKVideo plugin but for some reason it doesn't work. I've tried a myriad of different method with no success.
To activate the plugin, you use:
$(function(){
$.okvideo({
source: 'BHE8Yre3Ex8',
})
});
I've added some links that store the YouTube video ID as an attribute. When the user clicks the link, the video should stop playing the current video and begin playing the next selected one.
Also, I'm not trying to have the video play automatically (on page load)–only on a video selection. I've looked into the code but the options don't seem to work.
I've stripped my code and placed the core of it into jsfiddle, here: http://jsfiddle.net/mikemiketm09/rd4fL/
FYI: It did say you can use YouTube API with the plugin.
Your help would be greatly appreciated.

Categories

Resources