0

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.

1 Answer 1

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.