Watching YouTube videos through browser in Android app - android

I'm writing an android app that has video content and references videos on YouTube. I implemented code in the Android 2.3 SDK and it properly runs. However, my phone updated to Android 4.0 and now the activity force closes. The activity simply uses image and text views to link, not a video view. What is the proper way to implement this activity in 4.0 that is backwards compatible with 2.3?

Related

Android application - Only audio running on HTML5 video

Right now, I'm developing mobile application - Simple Web browser with Android Studio 2.3 (Android SDK API 15).
I'm using WebView to display web pages. All renders properly except videos (on YouTube or other platform with HTML5 videos). I can only hear audio but the screen of the video is black and that's it. I tried different solutions:
I enabled hardware acceleration on in Manifest file:
android:hardwareAccelerated="true"
Also I set this for my Main Activity java file. Brow is my variable for WebView.
brow.setWebChromeClient(new WebChromeClient());
brow.getSettings().setAllowFileAccess(true);
brow.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
And still with no luck. You can see my problem on the screenshot. So I'm waiting for working solution! If you need more info, type comment below! Thanks!
Screenshot of the problem

YouTube player API does not work with IE10 and Android?

Good time passed since the relevant posts - 2 years. I wonder if the mistake is on my part - I am using this tutorial
https://developers.google.com/youtube/iframe_api_reference?csw=1
"Getting started section".
I very enjoy the player itself which works perfectly on Firefox 23.0.1 and Chrome 29.0.1547.62 m, but it freezes in IE10 and on my Android Galaxy Nexus phone 4.3.
In IE10 it seems to freeze on the player state change. I've also tried Firefox app on my phone and again it works while native browser freezes on the same player state change.
I've checked the spec and it seems HTML5 player is supported by both IE past 8 and Android.
Could anyone enlighten me please whether the mistake is on my part or something is fundamentally wrong with IE and my Android phone native browser?
I have same problem. When I open same page with Android Chrome, video is loading successfully. But Built-in android browser and also Lumia's browser(IE) can't load video.
That's a strange situation that video can be load at Youtube player's demo page(https://developers.google.com/youtube/youtube_player_demo) on Android's native browser.

Adding music player controls to notification in Android

I created a notification with music player controls (shown below, Android 2.3.3) for my Android application. However, I'm facing an issue. In order to ensure standard behavior across all supported platforms (Android 2.2 - 4.2+) I set the notification background as black. I also couldn't use:
style="#android:style/TextAppearance.StatusBar.EventContent.Title"
style="#android:style/TextAppearance.StatusBar.EventContent"
for text styles since they aren't available in Android 2.2. Is this an appropriate design approach or is there a better alternative?

Android 4.1 web browser, Vimeo videos, and the Froogaloop API, Issue?

So I am having issues with the Vimeo player on an Android device (Samsung Galaxy S3) running Android 4.1.
In the web browser it seems that the Android OS web browser turns the iFrame into a native HTML5 player once the video starts. This seems to render the Froogaloop API useless.
An example can be seen here: http://www.dmns.org/science/museum-scientists/chip-colwell-chanthaphonh/mobile .
Click on the 'Videos' tab and click on the Next and Previous arrows. The arrows should stop the videos.
Those should 'unload' or stop/pause the video but they does not. It works on desktops fine and older Android devices, but the new Android 4.1 OS the player does not stop when the arrows are selected.
Note: I have not downloaded Flash for Android and don't want to.
If you have a solution or any suggestions to try that would help tremendously. Thanks in advance.

PhoneGap Android ChildBrowser plugin and YouTube - can't play any videos

We are using PhoneGap/Cordova 1.8.1 (Android) with the latest version of the ChildBrowser plugin. When we bring up a link to youtube in the ChildBrowser, we generally cannot play any videos. Here is our testing so far:
Android 2 (old Droid 1): Mobile YouTube site comes up, no videos will play at all though (doesn't even switch to video mode).
Android 4 (Motorola Xoom): Mobile site comes up, video seems like it is playing, but only shows a black screen (no sound);
Android 4 (Droid Razr Maxx): Mobile site comes up, plays, but no video only sound.
We also had someone report with an Android 2 device that the video would play, but would change the orientation of the device from portrait to landscape - then upon going back to the app the app would stay fixed in landscape (even though it is set to portrait only).
Yes, you should use the ChildBrowser.openExternal on Android as it will start the Android browser which you can play YouTube video's. The ChildBrowser.showWebPage does not start the browser, instead it creates it's own web view to display the remote side so it is not full featured.

Categories

Resources