A youtube embed I am using seems to freeze (pause and becomes unresponsive) when I mouse over it. It only happens on chrome, not firefox, and I think it is because of those thumnail previews when you go to fastforward but have no way of checking.
Does anyone know how I can track or diagnose what could be changing the youtube players state?
I have a function set up when it becomes paused, stopped, buffering, and youtube's errors (from their API) but none of these are being triggered. Is there something else you'd suggest using? perhaps in firebug or the like?
Use mm.cfg with Vizzy and a debug player to see what events are happening on the Flash side. A heap snapshot may help isolate the issue as well.
Related
I've been trying to work with the YouTube iframe api but I've noticed that sometimes it looks like it doesn't want to play any video, I get the following:
An error occurred. Please try again later (Playback ID: XXX)
It doesn't happen all the time though, so far I assume it happens when I swap between Google/YouTube accounts...
Does anyone know how I can prevent / resolve this issue from happening?
I'm facing problem with facebook video embedded on my post. My client wanted me to follow this method: https://medium.com/#BenBillups/facebook-video-embeds-that-actually-work-57037f8cdcf3
I've done all of the part except PHP code because that wasn't required by my client. Now what is happening. When page loads a play button appear to start video. On click it work just fine. It plays the video but only on desktops. The click event triggers on mobiles and tablets. But it doesn't start the video.
Please take a look at https://candylish.com/mix-and-match-swirl-cookies/ and also check in mobile. You'll see the difference.
In short, you've to click twice in mobile to start video.
Please help me sort this out.
Thanks :)
I think you are simply dealing with mobile browser's general reluctance to start playing video, when they can't determine it was directly connected to a user interaction (and therefor likely willingly triggered by the user.)
//Autoplay
FB.Event.subscribe('xfbml.ready', function(msg) {
if (msg.type === 'video') {
msg.instance.play();
}
});
This code waits for one of the SDK's events to fire and then tries to call the play method, introducing exactly the kind of asynchronism/detachment that gets this blocked, because techniques like that are often used in a malicious way.
In short, you've to click twice in mobile to start video.
That second click is "a whole different animal" altogether ... it happens on the native play button of the (now) embedded social plugin. The other script is not involved at all any more at this point, and this click is a direct user interaction that triggers the video to play, so it is allowed to work. This isn't nested into anything asynchronous or callbacks, it is straight up click => trigger play.
I don't think you will find any example using this technique where this will work differently.
Mobile browsers are more gracious when it comes to autoplay-on-page-load(!) videos, if those videos do not contain an audio track or are embedded to be muted by default. I don't think Facebook offers the latter as an option for mobile to begin with (the data-autoplay attribute does that for desktop, but is documented to not work on mobile) - so at most you could try with a Facebook video that is silent to begin with; but apart from that I'm not sure this restriction resp. when it actually gets lifted even applies here, it's probably not going to fulfill your client's requirement either.
I started typing this as a comment, but besides that it has gotten a little longer now, in this case I think it can't be done actually simply is the answer, even if it might not be a satisfying one.
I have been working with the Kurento docs to build a one to one recorded call. This is using the adapter.js library. It is working well, however when the streams are appended to the video elements they are extremely stop start.
By this i mean they will play video as expected for a second or so, freeze for a second and then restart playing again.
I have noticed this before in other webRTC libraries, but not all.
Is there something that I may be doing that is causing this? I believe that this is not due to my computer as it works using native code only (no library). Is this a known issue?
chrome currently has an issue where something like this happens if you do not call play() on the video element and don't have autoplay set.
If you code does not play in Firefox at all that might be it.
We use JWPlayer for video playback, with only a single player embedded in any page, and suddenly it has stopped executing callbacks, though it does not throw errors when the listeners are registered (for onPause, onPlay, and onComplete).
Embedding continues to work fine. The player responds to user interactions to pause, play etc. However, when these occur no callbacks are triggered.
As part of troubleshooting, I have replaced the callbacks with very simple troubleshooting functions, e.g.
jwplayer().onPause( function(event) { alert('pause!'); return true; } );
In the JavaScript console for both IE and Chrome, no JavaScript errors are shown. Troubleshooting statements (alerts) around every JWPlayer JavaScript call show that no errors are thrown. Wrapping all calls to JWPlayer in try/catch blocks and alerting any created error messages does nothing.
In the JavaScript console after page load, executing control methods such as jwplayer().play() exhibits the following behavior: does NOT change the player's actual playback state, but DOES trigger callbacks.
The JWPlayer version is "5.9.2156 (Licensed version)".
EDIT: Another clue: In the JavaScript console, even when the player is paused, alerting jwplayer().getState() shows "PLAYING".
EDIT: In our testing, disabling HTML5 mode prevents this bug from appearing, but is not optimal.
In the end there was no fix for this bug, but we worked around it by having the player default to flash mode first, then fall back to HTML 5 mode second.
The implication of the bug is that for those users who do not have flash support enabled in their browser, our pre-existing integration with Google Analytics will not work, but this should be a minority of users.
We considered upgrading to JWPlayer 6 but that is not an option at this time, due to a known issue with extra play events being reported.
I have the page http://video-stock.co.uk setup with 4 videos, all using video.js. It works fine with chrome etc which use the html5 implementation, but when I view in ie7/8 and the flash fallback, the big video and the first of the small videos are fine, but the other 2 small videos are black, and have no play button overlay, and are unresponsive to clicking, although a right-click does bring up the flash context menu.
I have next to no knowledge of working with flash to play videos, except the odd embed in Wordpress, and I was glad to find Video.js to sort all that out for me. All I can see in the code is that the correct video files seem to be getting sent into flash, but maybe it is because the flash player (.swf) file is being called more than once? Just a novice guess. Any help gratefully received.
Edit, for completeness I set up a test for flash on the page in chrome etc - if you go to http://video-stock.co.uk/?flashdefault you can view the page with all players in flash. It works fine on chrome, ff and even IE7+8. To get the flash default I have used:
_V_.options.techOrder = ["flash", html5, "links"];
I will change the default to that order if I receive no replies from you helpful lot.
After the edit I went to the site in IE without the flashdefault query var and all four players were working.
The only thing I changed was adding preload="auto" to the small videos, and that seems to have been the fix. Although it could have been getting the flash videos into the cache using the flashdefault that fixed it, until some new videos are added we won't find out. To Moderators, should I accept this answer now or wait till I know for sure?