How to handle keydown events for Samsung SmartTV SEF Player (link)?
I tried:
Markup:
<object id="pluginObjectPlayer" border=0 classid="clsid:SAMSUNG-INFOLINK-PLAYER" style="position:absolute;z-index:1;left:0px;top:0px;width:1280px;height:720px"></object>
Code:
var player = document.getElementById('pluginObjectPlayer'); //get player object
player.Play(streamUrl); //start playback
$("body").focus(); //focus on html element which can handle keydown events
Doesn't works. Playback starts normally, but keydown event is not handled.
SEF Player doesn't have any event key handlers, the key event will catched by the scene/main javascript code and need to do the action by code with the player API. For example to stop the playback :
case sf.key.STOP:
player.Stop();
break;
Related
May be a list of duration in seconds is declared, on attaining the duration, player should pause and show a dialog to the user. If user's answer is success, the video should continue playing, else video should seek to last success answer position if exists else into starting position.
I've tried with different video players with adding listener and seekTo() methods of those players, but
failed.
I have tried with:
1.pod_player: ^0.1.0
result: The player not responding , with audio continuing and video paused.
2.video_player
result: The listener is not working.
I am developing an app for a radio station using react-native-track-player. I have this working fine. When I press Pause, the player pauses as expected, but when I press Play again the audio continues where it left off on the stream. I would like to effectively "reset" the stream when paused, so that playing again will always pick up the latest audio - like a radio station should as it's live. I tried removing the track using TrackPlayer.remove([trackIndex]) where trackIndex = await TrackPlayer.getCurrentTrack() but this doesn't have the desired effect, it just carries on where the stream paused.
Can anyone help?
Thanks
When you call pause, you can use reset an after add the tracks
Something like that
TrackPlayer.pause();
TrackPlayer.reset();
TrackPlayer.add(track);
I have a working webview in Titanium with an embeded youtube video. The video plays nice, I can stop it, resume it and so on. But when the video plays to the end and I press "done". The webview goes black with the text: YouTube. Nothing else. I would like there to be the same thumb and playbutton as before I played the video.
My embeded code looks like this:
html:'<html><head></head><body style="margin:0"> <embed id="yt" src="'+tubeURL+'" type="application/x-shockwave-flash" width="150" height="113"></embed></body></html>',
I've googled this problem for days now. I hope someone can help me here.
Cheers
//Martin
EDIT: This solved it. Put &controls=1&rel=0 in the end of the URL.
YouTube players can be embedded in a web page using either an < iframe> tag or an < object> tag.
By appending parameters to the SWF or IFrame URL, you can customize the playback experience in your application. For example, you can automatically play videos using the autoplay parameter or cause a video to play repeatedly using the loop parameter or in your case hide or show controls.
controls
Values: 0, 1, or 2. Default is 1. This parameter indicates whether the video player controls will display. For AS3 players, it also defines when the Flash player will load:
controls=0 – Player controls do not display in the player. For AS3 players, the Flash player loads immediately.
controls=1 – Player controls display in the player. For AS3 players, the Flash player loads immediately.
controls=2 – Player controls display in the player. For AS3 players, the Flash player loads afer the user initiates the video playback.
The correct answer for your question would be controls=2.
SOURCE INFO: https://developers.google.com/youtube/player_parameters#controls
I have a UIWebview which will play a YOUtube video playlist, and I need to handle the events when user click DONE button and close the webview.
So far, the working solution i found is to handle UIMoviePlayerControllerDidExitFullscreenNotification, but when UIWebview finish playing a video in the list it will exit the fullscreen mode and enter back to fullscreen mode to play the next one. My app handles the event of exiting fullscreen as pressing DONE button and only the first song of the list get played.
My question is that is there anyway to handle DONE button click events without handling UIMoviePlayerControllerDidExitFullscreenNotification, or to handle those two events separately?
I'm using MPMoviePlayerViewController and I want to know if there is a method that can tell me when the user clicks on the Pause button for the video, like an observer?
You should use MPMoviePlayerController instead :
Movie Player Notifications
The MPMoviePlayerController class generates numerous notifications to keep your application informed about the state of movie playback. In addition to being notified when playback finishes, interested clients can be notified in the following situations:
When the movie player begins playing, is paused, or begins seeking forward or backward
When the scaling mode of the movie changes
When the movie enters or exits fullscreen mode
When the load state for network-based movies changes
When meta information about the movie itself becomes available
For more information, see the Notifications section in this document.
http://developer.apple.com/library/ios/#documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/MPMoviePlayerController/MPMoviePlayerController.html