Bug in 'YouTube iOS Player Helper' library - youtube-api

I have been using the 'YouTube iOS Player Helper' library for playback of our youtube videos in our iOS App (iPhone).
Today I noticed a bug in the same, whenever it tries to load a video with 'In Stream Ads' it pauses the playback of video, closes our app and then opens mobile safari app with the link to
"pubads.g.doubleclick.net" page. The page loads with a blank screen.
I repeatedly checked the app, this behaviour is consistent with all YouTube videos with 'In Stream Ads'. Also a video without any ads is working ie playing fine in the app without triggering mobile safari.
Any ideas on when this bug will be resolved?
I'm using iOS 8.1.2 (12B440) on iTouch 5th generation. I also get the same result in iPhone simulator also.
Thanks :)

A temporary solution (until this problem is fixed) is adding another condition in the method shouldStartLoadWithRequest() that is located in the file YTPlayerView.m. The condition should intercept requests made to pubads.g.doubleclick.net.
The following lines solved the problem for me:
else if ([request.URL.host isEqual: #"pubads.g.doubleclick.net"])
{
return NO;
}

Related

OpenTok Web SDK on iOs: session.publish reloads page

I have set up a video-call app using the Vonage Video API and Ionic. I am using the web SDK. Everything works perfectly on browser and android devices, but I have one problem on iOs devices: after creating a publisher and calling session.publish, my app reloads instantly. The callback from session.publish does not get called, the reload happens before that. All I see is a pending "ClientEvent" XHR call that never gets resolved.
Before you ask, the user has camera and microphone permissions.
I solved this by using the VP8 video codec instead of the H264 one. It's an ongoing issue in iOs 15.1.

Embedded videos from Vimeo in iOS app: “Sorry, because of its privacy settings, this video cannot be played here”

I have developed an iOS app that gets webviews from a Wordpress page. These Wordpress pages has embedded Vimeo videoes, which are hidden from Vimeo search and can only be seen and embedded on my domain.
I have a Wordpress plugin for embedding the Vimeo videos. Lately, in the app (not at the webpage/desktop view where the content also can be viewed), instead of showing the video I get the message “Sorry, because of its privacy settings, this video cannot be played here”. When I go back to the menu, and then back to the video page (web view) a few seconds later, the video is shown and everything's working.
Is it something wrong with the plugin I use?(https://wordpress.org/plugins/advanced-responsive-video-embedder/)
Or maybe a cache delay?
Update: Can it have something to do with iOS9?
Update II:
I got an answer from Vimeo:
Hi there, Thank you for bringing this to our attention. We are currently aware of an issue where videos with domain-level embed privacy are not playable on Chrome and Safari for iOS 9.3, or Safari 9.1 for OSX due to a bug with Apple's WebKit browser engine.
We have confirmed that the next update to iOS, v9.3.2, will fix this issue. There is no ETA for the update, however, as Apple does not comment on the timing of their future releases. In the meantime, you should be able to work around this by temporarily disabling domain-level privacy for your videos.
Puffin works fine.
Download a browser app named PUFFIN from AppStore, it is able to run the videos which showed the privacy error in ios 9.3.

Android Marshmallow stuttering on background streaming (Buffers?)

I 'm developing an application that allows you to continue receiving (like a browser) in the background Youtube video and audio through the YouTube Player API Reference for iframe Embeds in a WebView.
When you're viewing a video, and turn off the screen with the power button, everything is still fine, but when I press the home button from the application, for a few seconds is perfectly listen, but then audio begins stuttering.
I tried to implement the WebView in a service, even with a floating overlay window, and all works, but the same thing happens when I press the home button, start stuttering audio and video (because in this case you can see the video too). Later, if I return to the application, all begin to work well again. It seems that app need to stay in foreground to work properly.
I've been trying different ideas, and I've been searching google for a week, but i dont know if this have a solution, the error is in Android 6.0, Android 5.0.2 working properly.
Here is the logcat for android 5.0.2 when i press home button:
W/cr_media: calling MediaCodec.release()
W/cr_media: calling MediaCodec.release()
E/OMXMaster: A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
W/linker: libaricentomxplugin.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
E/OMXMaster: A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
E/OMXNodeInstance: OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
E/ACodec: [OMX.google.vp9.decoder] storeMetaDataInBuffers failed w/ err -2147483648
E/OMXNodeInstance: getParameter(1868562439) ERROR: 0x8000101a
And the logcat for Android 6.0:
E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb8b429e0
D/AudioManager: AudioManager dispatching onAudioFocusChange(1) for android.media.AudioManager#7f0c8a8com.mzrsoftware.android.youparrot.WebViewerYoutube$3#898cfc1
W/cr_media: calling MediaCodec.release()
W/cr_media: calling MediaCodec.release()
W/OpenGLRenderer: Fail to change FontRenderer cache size, it already initialized
E/OMXMaster: A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
E/OMXMaster: Failed to get omx plugin handle
D/AudioManager: AudioManager dispatching onAudioFocusChange(-1) for android.media.AudioManager#7f0c8a8com.mzrsoftware.android.youparrot.WebViewerYoutube$3#898cfc1
E/OMXMaster: A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
E/OMXMaster: Failed to get omx plugin handle
W/OMXNodeInstance: [1:google.vp9.decoder] component does not support metadata mode; using fallback
E/ACodec: [OMX.google.vp9.decoder] storeMetaDataInBuffers failed w/ err -1010 / is-streaming 1
E/OMXNodeInstance: getParameter(1:google.vp9.decoder, ParamVideoAndroidVp8Encoder(0x6f600007)) ERROR: UnsupportedIndex(0x8000101a)
E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb8e1a248
-----(Here audio, video or both start stuttering)-----
W/OpenGLRenderer: Fail to change FontRenderer cache size, it already initialized
E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb8ed9ff0
Viewing logcat, and with what I found online, it seems to be a problem specific to Android 6.0 with buffers (buffer underrun), which may have been fixed in Android 6.0.1 , but I can not prove it.
Any solution for this?? Thanks!
I have observed similar issue with youtube embed videos on Android L (5.1.1), but in my case issue was with video only in chrome/native browser and audio was working fine. When I play youtube embedded videos on some website, video screen remains "green". After investigating, I found that issue was with incorrect sanity check on buffers in libstagefright (check https://android-review.googlesource.com/#/c/178013/). I am developing custom ROM, so fixed it in android OS code and now AV works without issue.
As a workaround, in chrome if I enable "Media Source API" from chrome://flags then it works without making change in OS.

How to play video on an ios captive portal pop up browser

I've setup a Captive Portal with dd-wrt, wifidog, authpuppy and some plugins from authpuppy as well as my own web app.
I've found that video tag from html 5 could not be played on ios popup broswer(I think it's a UIWebView), while android works fine.
Is it possible to make video play-able on this reduced version browser from ios?
It works in ios 7.
It seems that ios 6 (or below) cannot load some resource types (such as mp4 or zip and so on) in the popup web browser.
Here mention a method to how to solve these kind of problems.(it skips the popup browser)
But if you really want to play videos in the popup browser, I'm also researching it...:P

Is the Youtube IFrame API Embedded Player broken on iPhone?

Recently I noticed that I am unable to click play on an embedded YT video in a web page on Iphone. I think they recently may have updated the API.
To verify, visit this link I found out in the wild, with an iphone:
news article w/youtube embed
Tested on both Mobile Safari and Mobile Chrome.
The bug is that you cannot tap on the play button and have the video play. Interestingly enough, I tried this on an iPad and it worked fine.
Also of note, if you go grab the youtube-api example source code and try that it works... so that's where I'm getting stumped.
Anyone have any ideas on how to fix/solve this?

Resources