What video player to use for streaming within Ionic 2? - html

I need to build an APP that would index videos (m3u8) from an API and allow to play them within the application itself. Only plugin I could make work and that seems to work in both iOS and Android is cordova-plugin-streaming-media, but has some issues with HLS streaming (https://github.com/nchutchind/cordova-plugin-streaming-media/issues/77).
Any suggestions? I would like it to support fullscreen. Tried videojs and couldn't get it to work in fullscreen within the device.
Thanks!

Related

Ionic Media Player

I'm building an application using Ionic v3 that runs media (*.mp3, *.mp4) on a tablet where the data resides on an external microsd.
When I used HTML5, I couldn't have the microsd access the "file:///storage/emulated/0 ...etc", however, it works perfectly fine when accessing a file over the internet. I guess i can't have it working from a microsd since HTML5 cannot access a local file. Is it true? or is there another way around?
When I used Ionic VideoPlayer plugin, there is no way where i can play the video inside a div. I need to play the media in a div so i can hide it when an mp3 is playing and show it only for mp4. however I can play the file with no issues from the micorsd ("file:///storage/emulated/0 ...etc")
Is it possible to have an iframe pointing to a local page generated by the ionic application?
example: <iframe src='TestPage' width='50%' height='50%'></iframe>
Is there a plugin that i can use where i can pause/start/control volume/resize and play media from microsd installed on a tablet other then the ones stated above?
Thanks
check on this plugin https://ionicframework.com/docs/native/media/ i am sure it will help solve your problem.

Ionic3 how to play audio file?

I am trying to make a audio player for Ionic3.
First, I used tag in html. It works on IOS but not work in Android.
Second, I tried #ionic-native/media. But it should record first and can play.
I am wondering to how to implement audio player.
Please help.
You can easily use Ionic-audio plugin for that.
Here is the Demo
npm install ionic-audio --save
An audio player plugin for Ionic that works out of the box in the
browser and device using an underlying audio provider depending on the
environment. When running inside the browser the plugin will default
to a Web Audio provider, whereas on a device it will switch to Cordova
Media if cordova-plugin-media is available, otherwise falls back to
web audio.
Git Repo

swfobject not working on iOS

I'm trying to embed Twitch player using Javascript API - here is documentation how to embed a player using swfobject - https://github.com/justintv/Twitch-API/blob/master/player.md. My Problem is that the code works great on desktop, but on mobile browsers - iOS (I haven't had a chance to check Android yet) script simply doesn't embed a video. It works when I use iframe method though. Is there any fix for iOS to make this works using JS API and swfobject?
swfobject is the flash player (swf = ShockWave Flash). Flash does not, and never will, work on iOS. The iframe method runs coder that detects the OS, and loads the native iOS player on iOS, and flash for everything else. You need to duplicate that functionality.

Can a Jquery mobile app open android video player to play video?

I am creating a cordova jquery mobile app. which play video in it. I have tried video tag but it is not showing the video only sound is played .
Now I want to open android video player to play my video url.
You can try this: FileOpener Plugin
Video tag have too much issue with different platform and version on Android, if you want to avoid that, Crosswalk is a good solution.

jQuery Mobile video website, convert to PhoneGap app with videos on SD card instead of streamed

I have a jQuery Mobile website I created for a friend/client of mine. It only has 6 pages or so (2 of them are dialog windows). The site has HTML5 video with fallback for flash support via the videojs library. All videos are encoded properly in mp4, ogv (theora), and webm and so far play on every device I have used.
My problem lies bandwidth, the purpose of the program really needs to be an application because these are informational videos that may need to be viewed at any time, even with no web access (web access is required for first login to verify credentials).
I was left with 3 solutions, try writing native apps for all the platforms myself in their native languages, use Sencha Touch (which I am comfortable enough with extJS to do), or taking my existing jquery mobile app that is 100% functional including log-in and some backend package management to assign users a package of videos (there are multiple packages each with between 8-20 videos), and follow the jQuery Mobile tutorial for getting your app ready for PhoneGap, I believe its only enabling two settings, and both are to enable "cross-domain" requests, since my current web app would be running as localhost, it would see the scripts as external pages.
My main question/problem is for one, I have never used PhoneGap; aside from their Hello World android tutorial, and I know there are other all-in-one frameworks out there now: PhoneGap, Titanium, Corona, Adobe Flex (which I am installing while writing this tutorial, to see what it has to offer. If it has features like encoding videos automatically for the target device (video resolution changing), or even has local video playback features at all that may work.
Does anyone know which of the current frameworks have the ability to install a set of videos to the sdcard, (totaling around 6mb per install), and play them natively (by that i mean, in the devices native player, not inline inside of a webview). Which on android phones anyways, my current videojs based player plays the files natively in everything I have tried it on.
I just need a push in the right direction, if there is a PhoneGap plugin that I don't know about that allows videos to be played from the sd card, that would be terrific. Although I am not very happy with the speed of the android and blackberry webview controls. So something that uses 100% native controls would be great. I hope you guys can come up with some ideas, you can see the current app in action at m.yourvideobenefits.com email:abc#tool.com password: demo
You should view it from your phone if you want to see it properly, but if you do not have a smart phone; keep in mind that when viewing this page certain desktop browsers, the videos become their actual size after they are through loading. This is because i have autoload="true" in the video tag (which is ignored on most phones, but believe it or not, setting autoload="true" is what actually allowed the videos to not play inline on certain devices. A bug on the device, I am sure...but without this tag the videos played inline on iPhone 4 with the latest iOS version.
You could do it very easily with phonegap; you already have your web page, so it would be much less work, probably.
You could get the videos from inside your apps bundle in ios, and then it wouldn't be hard to select the one with the best resolution for the device being used. You could also download the videos at the perfect format and resolution the first time your app plays from your server using the file api. That convined with the storage api is nice for actualizations.
There's a plugin I use for android, because video tag is sometimes bugged or doesn't work at all in older versions, https://github.com/phonegap/phonegap-plugins/tree/master/Android/VideoPlayer.
It only plays from web or sdcard, but that's rarely too bad.
I can't help you with black berry, but I'm pretty sure there must be a way of doing it. And, anyway, appcelerator doesn't support it yet, so you would probably had to do it natively. Even if there isn't a plugin for black berry, you'd probably have to chose between native developement and html5 player inside phonegap. I won't give you my opinion about it here, for I'm not the one to give it and Stack Overflow says I shouln'd give it anyway.