I used this example to play embed videos from youtube, with youtube it works perfectly. When I try to use it with Vimeo embed video, Play button works like Fullscreen and Play button at the same time.
How can I change code, to make the Play button work correctly?
Currently the Vimeo Player will always go fullscreen on mobile devices - inline playback is not yet enabled.
Vimeo will be enabling inline playback on mobile in the near future, but there's no ETA for that development.
Related
While HTML5 video works on my Google phones, it no longer works on Samsung devices since I upgraded to api level 26 for my webview project. Whenever I visit YouTube on my webview app, the spinner spins endlessly and says "if playback doesn't begin shortly, try restarting your device". Html5 videos on other websites work, however.
I've tried modfying the WebChromeClient for my WebView, but that did not do anything. Dom storage is enabled as well.
I have refer to Playing HTML5 video on fullscreen in android webview to play video on full screen.
But I didn't use the native webview, I used the Crosswalk webview to play the live flv video, which is not a HTML video format. I use flv.js and xwalkwebview, the live flv video plays well, but I want to play it fullscreen.
And I have refer to Is there a XWalkView webviewclient?. WebChromeClient of webview is corresponding to XWalkUIClient of crosswalk webview. While XWalkUIClient doesn't have somemethod like onShowCustomView() and onHideCustomView().
So how to make it.
I am making an app for Android Wear Devices that don't have speakers. For now I am testing. How can I make it so when you tap "button1" it does said function that plays, say an MP3 file FROM THE PHONES SPEAKER.
You'll need to build out a companion phone app to play the sound, and trigger it from Wear, probably using the Message API. The FindMyPhone sample (linked from that doc page) is probably a good place to start, as it's doing something quite similar to your requirements: playing a sound on the phone, triggered by an action on the watch.
I want to play video on my android app with a player like YouTube.
My webapp is using videojs for playing different video formats.
I dont wish to use the native media player on android as i want to show portrait version of it and show the likes and comments beneath the video.
Currently am using a webview on the half of the layout and below that am using the layout for likes, comments etc.
So, What should i go for ? I want to use the player like YouTube. Is it even possible ?
Thanks !
So, I'm using this code to play some video after a button click:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=VYqhW2YFN7k")));
But it just opens the whole youtube web page in the browser with suggested videos and stuff. Is there a way to directly play the video in landscape mode in fullscreen?
If You are using Youtubeplayer APi to view video than you can use this line in onInitializationSuccess Method
youTubePlayer.addFullscreenControlFlag(YouTubePlayer.FULLSCREEN_FLAG_ALWAYS_FULLSCREEN_IN_LANDSCAPE);
youTubePlayer.setFullscreen(true);
Set your screen orientation landscape in android manifestfile.
You can use the new YouTube Data API by Google.
There, you have a lot of control of how to show the video. This includes even putting the view that shows the video into your activity, so you can set whatever orientation you wish for it.