UniWebView playing audio from local storage - ios

Using UniWebView we try to display a locally stored html page to play audio that is stored in a sub-folder at the same location as the page. While this works fine for iOS 10, 11; we seem to have a problem on iOS 9 where the audio doesn't play. After inspecting the page in Safari, there was an error when fetching the resource from local storage but it did not say why. Implementation for playing audio is the same for all iOS versions.
Wanted to ask if there are any limitations to iOS 9 or specific rules of how to fetch and play audio files the from local storage?
PS.: UniWebView is a wrapper for WkWebView on iOS
Error screenshot from Safari

Related

Flutter HLS (m3u8) format video from asset not playing on the iOS device

I'm facing a problem with the video player. HLS (m3u8) video from the asset is not playing on the iOS device. I've downloaded all the ts chunk files with playlist.m3u8 and copied them to the asset folder. Android there is no issue it's playing fine from the asset but on the iOS device it's not playing and the error log also not throwing.
Any solution? How to play HLS (m3u8) video from the asset/local on the iOS device.
Using: video_player: ^2.3.0
Thanks in advance!
If you need to access videos using HTTP (rather than HTTPS) URLs, you will need to add the appropriate NSAppTransportSecurity permissions to your app's Info.plist file, located in /ios/Runner/Info.plist.
See Apple's documentation to determine the right combination of entries for your use case and supported iOS versions.

get shared/server url using CocoaHTTPServer

I am creating application that play video using chromecast device on TV (Apple TV or monitor that support HDMI port). Application is playing url like "https://serveraddress/video.mp4" but its not playing the video stored in app bundle(local video).
I have found that to make video play in remote machine (here it is TV) have to create local server on iphone.
I found this SDK CocoaHTTPServer I have run the sample application but not getting how to take video URL that is stored in app bundle.
Can someone please help me in this.
Thanks in advance.
This work great for me.
https://github.com/swisspol/GCDWebServer
Initialize as given in sample code (give document directory as root).
Than to access local file copy that file in document folder and than access using http://localhost:8080/download?path=new.jpeg

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

iOS "Cannot Decode" m3u8

I have a live stream that in the past was playable on iOS devices (using the URL for the m3u8 file). Now, when I try to view the live stream on an iOS device, I get a message that says "Cannot Decode". I am still able to use this file on Android devices though. Does anyone have any idea why iOS devices would not be able to play this file?
The live stream is being encoded by Adobe Flash Media Live Encoder 3.2 and we are using Adobe Media Server 5. I followed the steps here to get everything setup initially (when it was working). Once it stopped working on iOS, I verified that none of the settings had changed.
iOS does not support FLASH, so iOS cannot decode a FLV stream, it only support HLS(HTTP Live Streaming).
You can set the Live Encoder as following
Preset: H.264
Video Format (H.264), click the right spanner, set Profile(Main), Level(3.1), Keyframe Frequency(4 seconds)
FMS URL: rtmp://yoursever/livepkgr and Stream: livestream?adbe-live-event=liveevent
Then, open iDevice Safari and go to http://yoursever/hls-live/livepkgr/_definst_/liveevent/livestream.m3u8,it will be played.

youtube api player not working on iOS?

I'm using the YouTube API in my flex app to play videos and it works fine running on my computer and android, but I'm getting an issue when I try to use it on iOS, I just get a black screen!
Any ideas?
I was curious so did some research.
First, I searched for SWFLoader on iOS and this post came up. I'll quote:
You cannot load SWFS that run ActionScript on IOS
Then I realized from your comment you may be using the Loader class; so I googled Flash Loader on iOS and came across this. To quote:
In an iPhone application, you cannot use the Loader.load() method.
However, you cannot run any ActionScript code in SWF content loaded
with the Loader.load() method. However, you can use assets in the SWF
file (such as movie clips, images, fonts, and sounds in the library).
You can also use the Loader.load() method to load image files.
You may benefit from reading through the actual Adobe docs. Specifically this page which focuses on unsupported APIs. It is the last link where the above quote comes from.
It's true you cannot load and run a SWF and in this case the video is a stream so you there is no media to save. Youtube does have an alternative URL that points to an actual mp4 file which will play on iOS. You can use a VideoDisplay player and that URL to play the video.

Resources