I am using their api: dailmotion api
How do I stop the video from downloading?
I know I can use pause, but this will continue to use bandwidth, I want to stop it and later load new video on demand.
You basically can't control that behavior from the player API. Once the video
starts (either when the user clicks plays or if autoplay is enabled), the player
will start to download the video stream and will handle how it's downloaded.
Related
Can anyone please tell me how to play and pause youtube videos? I mean to say when I pause one video it should hide and exactly at the same position another video should come . And when I pause this then again the previous video would come.Remeber - each time I toggle, the previous video must pause.
I am using You tube API and need to embed two videos over there.
I am having trouble resolving this ... please help...
When I play a video using YouTube Player API and open another application in multi-window mode my activity receives onPause and video playback pauses. I expected YouTube Player API to follow the guidelines at http://developer.android.com/preview/features/multi-window.html#lifecycle
"we recommend that activities that play video not pause the video in their onPause() handlers. Instead, they should pause video in onStop(), and resume playback in onStart()."
YouTube app works as expected.
How do I change the YouTube player on my web site. Like http://vidsshare.com/
Use the IFrame API for the embed video. The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript.
Using the API's JavaScript functions, you can queue videos for playback; play, pause, or stop those videos; adjust the player volume; or retrieve information about the video being played. You can also add event listeners that will execute in response to certain player events, such as a player state change or a video playback quality change
Just check the link above to know more about it.
For more information, check this YouTube Player Demo. This demo demonstrates the YouTube Player API's functions. Embedded players must have a viewport that is at least 200px by 200px. If the player displays controls, it must be large enough to fully display the controls without shrinking the viewport below the minimum size.
Is it possible, using javascript, to detect if an embedded youtube video pauses playback in order to let the video buffer? I know that there are events that fire when the user presses pause, but I'm looking for an event that fires when the video pauses due to a slow connection. I'm creating a web application where it's important to have the video play through smoothly. If the video pauses due to a slow connection, I want to detect that.
Use this code player.getPlayerState():Number it seems like you are allowed to ask the player what status it is in so this may help you
https://developers.google.com/youtube/js_api_reference
There is also a state 'buffering' being fired when the player needs to buffer more data..in that case the video stops. I guess also 'error' state might be of help.
The solution I worked out is just to use the javascript API's onStateChange callback (https://developers.google.com/youtube/js_api_reference) to detect when the player is started for the first time and when it finishes playing at the end. When the player is started, I grab the current time. When it finishes, it sees how much time has elapsed. In my application, the user cannot pause the video, so comparing the elapsed time to the video length indicates if it paused for loading.
How to control FLV Playback in flash with Action Script? I want to play Video in my webpage similar to YouTube. I have done it with automatic play but I want it when you press play button, then play and pause, volume, next & back as well.
There are tons of tutorials on this subject on the web (example: gotoAndLearn)
Basically you just create a Video object to which you attach a NetStream then you perform your play, pause, stop and seek operations on the NetStream which is really straightforward.
Take a look at the AS3 documentation on the videoclass also, it helped me a lot.