Open dapearce opened 9 years ago
Yeah, same for me.
Idem
Same, sadly
+1
The workaround is to check device type and version:
$scope.fallBackToUrl = function()
{
version = ionic.Platform.version();
return ionic.Platform.isAndroid() && ( version >= 5 || version === 0 )
}
And use ng-if:
<ion-item ng-if="fallBackToUrl()"
@hryamzik thanks, but what to do when the version is wrong ? I can't let the app do anything :/
@JerryBels
<div class="video-container">
<iframe ng-src="{{getIframeSrc(video.snippet.resourceId.videoId)}}" frameborder="0" allowfullscreen></iframe>
</div>
.video-container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px; height: 0; overflow: hidden;
}
.video-container iframe, .video-container object, .video-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.controller('VideoDetailCtrl', function($scope, $stateParams, $sce, YouTubeService) {
<...>
$scope.getIframeSrc = function (videoId) {
return $sce.trustAsResourceUrl('http://www.youtube.com/embed/' + videoId + '?autoplay=1');
};
})
Thanks, will try that
Getting the same issue here on 5.0.2. Is this repo still under active development?
Hi guys,
Sorry for the so late reply... I don't have any device running on 5.1 to test it and don't have the time to dive into Open Youtube Activity source code for now.
Hi everyone - I'm desperately trying to find a solution for this problem. Does anyone have any advice? Is there another plugin that works well for android? Didn't think I would have to but I will pay for a stable plugin. Please help as my app has this bug on production
Looking for a solution too. This plugin works great on iOS, but doesn't play on Android 5.1.1.
Can we each donate 25$ to @Glitchbone so he can buy a phone which supports a newer version of Android and fix the issue? I would love the plugin to work on Android again and would also love to see it on NPM!
@Glitchbone how much would you need to continue this project?
For anyone else struggling, we got around this issue by using the iframe player api, wrapped in a directive found here:
https://github.com/brandly/angular-youtube-embed
So far it's working out as planned. Good luck and let me know if I can be of more help
Sorry guys but I won't be able to solve this issue. I just made the bridge between cordova and OpenYoutubeActivity which doesn't work anymore since Android 5. I didn't find any alternative for now..
Too bad. I'm using this plugin for Android in the meanwhile: https://github.com/dawsonloudon/VideoPlayer/tree/5d1015ce79e81800009bc7988d242c593b2d51a1
@Glitchbone will you bring the plugin to NPM/iOS only?
love to see it works with both iOS and Android 3.x+ (including 5)
Use this plugin https://github.com/d0cz/CordovaYoutubeVideoPlayer
Hi, this is working on older versions of android but getting a "Can't play this video." error when trying to use it in Android 5.1. Any idea what's going on?