Phonegap RemoteControls ios Plugin not working when device is offline - ios

I am using RemoteControls phonegap plugin on iOS to control playing audio while device goes to sleep (https://github.com/shi11/RemoteControls) - great plugin !!
however - when the device is offline it does not work correctly … the audio title shows up as the full file path to the audio .mp3 rather than the 'title' passed to the plugin - this works fine when online.
It would seem the issue is down to the setting of the remoteImage - this is downloaded to the app to allow access offline but I use a 'Library no-cloud' location …. even if this is not set .. ie. remoteImage = "" it will not display the title - only the fullpath ( which is very confusing to the user). Even when device is online but the image path points to the local file thumbnail path then it fails to display the title (again just the local audio mp3 file path) … and no thumbnail image. But when online and the image points to a remote valid url image (even though the filepath to local audio .mp3 is the same) all works as expected.
I am no objective-c developer - but looking at the code it appears that it is expecting an image called 'no-image' when offline and can not find the thumbnail image path … but where should this be held ? and regardless of whether an image is available or not should the plugin still function so that the title is the one passed from the app (same as when online) as this is only a string …. not a file path !!
Any help really appreciated - great plugin but need it to work same way when offline ….

I think you're right. The plugin doesn't function accurately (or as you expected) when the device is offline. The only way to fix this is to fix the code and build/release. If it's not your code, or you can't fix it, then the vendor/maker has too. Contact them?

Related

react-native-text-detector worked fine in android but why it always returned false in iOS?

First, I used https://github.com/jeanpan/react-native-camera-roll-picker#readme to get an image from photo library, it returned a uri: ph://11A68DD6-A651-462D-BDAB-68FB853ED141/L0/001
Then, I used https://github.com/zsajjad/react-native-text-detector to get text from that image
It worked fine in android but it always returned false in iOS, and I found the following error in console log
NSURLConnection finished with error - code -1002
For more information, the image control can show that image correctly
Here is my source code : https://github.com/haison8x/react-native-test-ocr
Is there any problem with that URI or with application permission?
Due to the sandbox policy of Apple https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html, your app cannot read the photo in gallery directly, it will encounter the error: NSURLConnection finished with error - code -1002.
Here is my approach:
Use RNFS.copyAssetsFileIOS copy photo to temp file at your app documents
Use react-native-text-detector to analyze that temp file
The full example is pushed to https://github.com/haison8x/react-native-test-ocr

Azure media services - Issue with viewing an encoded video on IOS

I have an Azure Web App.
The end user can view video files in the application, both with and without encoding.
Without encoding, everything works fine on all client devices-
The file URL in this case looks as following:
videojs: dispatching event: sourceset
[{"src":"https://myAppName.blob.core.windows.net/myAppName/videoFileName.mp4","type":"video/mp4"}]
For encoding, we use the Azure media services.
In this case (with encoding), the file url looks as following:
videojs: dispatching event: sourceset [{"src":"https://myAppName.streaming.mediaservices.windows.net/47686721654-6056-477190467269/5f4404565467771890ab66920d936327.ism/manifest","type":"video/mp4","techOrder":["azureHtml5JS","flashSS","silverlightSS","html5"],"protectionInfo":[{"type":"AES","authenticationToken":"provided"}]},{"src":"https://myAppName.streaming.mediaservices.windows.net/47686721654-6056-477190467269/5f4404565467771890ab66920d936327.ism/manifest(format=mpd-time-csf)","type":"video/mp4","protectionInfo":[{"type":"AES","authenticationToken":"provided"}]},{"src":"https://myAppName.streaming.mediaservices.windows.net/47686721654-6056-477190467269/5f4404565467771890ab66920d936327.ism/manifest(format=m3u8-aapl-v3)","type":"video/mp4","protectionInfo":[{"type":"AES","authenticationToken":"provided"}]}]
When the end user tries to view this encoded video on iphone - IOS, it does not play successfully.
On Windows, it works well.
I read this article about url suffix needed to be added to video file url: specific suffix for each device, but I'm not sure this is the problem.
https://www.returngis.net/en/2014/11/microsoft-azure-media-services-testing-output-formats-in-live-streaming/
I will appreciate your help.
Can you try playing the videos in http://ampdemo.azureedge.net/ and see if that works. If you check Advanced, you will be able to specify specific formats.

iOS Safari file input [Take Photo] capture = Pano

On iOS Safari, and clicking to input a file with accept image/*, I get the [Take Photo] option. When I touch that I'd like the option for Pano, to be available, but it's not.
Basically I created a demo where you can upload an iOS Pano and vie it in 360. Works great, but the user has to upload a previously shot Pano, and not take one realtime.
Was hoping something like capture="pano" or accept="image/*;capture=pano" as the file input's attribute, would do the trick.
Anyone know a way this could be done, or do I need to do a dev request at Apple?

NSFileManager.defaultManager().fileExistsAtPath returns false when using iOS device

I have been trying to play a video with MPMoviePlayerViewController and it works fine. But before I play it, I want to check if the video I want to play really exists, so I'm using NSFileManager.defaultManager().fileExistsAtPath, with the path to the file in the iPhone camera roll
My problem comes when checking if it exists. If I check it with this piece of code :
// videoImageUri = "/Users/AppName/Library/Developer/CoreSimulator/Devices/3DAC8D46-3E32-4143-A552-2DB325CB5965/data/Media/DCIM/100APPLE/IMG_0006.mov"
NSFileManager.defaultManager().fileExistsAtPath(NSURL(fileURLWithPath : videoImageUri).path!)
It returns true when used in Xcode simulator, but if used with the iPhone, it returns false, even when the file exists. I know it exists because the MPMoviePlayerViewController plays it right.
The path I use when using iPhone is
/var/mobile/Media/DCIM/100APPLE/IMG_0150.MP4
Maybe, is there any permission restriction about reading camera roll?
Applications are only allowed to access their own directory. Access to other parts is denied, so naturally all queries for files will say they don't exist.
The internal components like media playing have access to other directories also, otherwise you wouldn't be able to play items from the camera roll at all inside applications.
Seems the simulator doesn't enforce the permissions at all.
More information about filesystem on iOS.

RoxyFileman blank pop up on server

I'm using Nopcommerce, everything seems to work fine on the local machine. But after publishing and uploading the site to the server when I want to insert an image or video an empty pop-up opens with only RoxyFileman title.
By browsing the pop's source I can see the controls are in the page but not displayed.
How can I solve this issue?
Provide read/write permission to image folder(yourwebsite\Content\Images) for local IIS user . Also do check & clear System Warning from website ->admin->System->Warning.
Better you provide screen shot of issue if still problem persist.

Resources