I found this https://developer.blackberry.com/html5/apis/blackberry.io.html example that load a file, but, nothing for save a file in html5 webworks to BB10
We actually have a sample that shows how to do this hosted on GitHub.
https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/canvasToFilesystem
The sample shows how to save imageData from a Canvas element to the filesystem, but the actual file writing portion of the sample could be used for any file type.
https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/canvasToFilesystem/saveCanvas.js#L31-L98
Related
I am trying to play a wav file using html 5 audio player but it shows file could not be decoded.
Anyone please let me know what is wrong with this wav file so it is unable to play in html5 audio player.
I am working on a call recording system that records these kind of wav files and now I am integrating html 5 audio player to play in system.
If file does not support in html 5 audio player then please let me know any alternative option to play file in system.
Below is url to download wav file
http://sipprintdemo.com/callrecording3/download.php?file=../../../sipprintcalls/2016/05/17/15/20160517_152047_XRT.wav
It is difficult to say why it is not decoding without seeing your code. What browser are you using in order to test? .wav files do work with HTML audio but not all browsers support that file type. I know that IE for example does not support it.
Another option would be to convert the files to .mp3 format that is support by all browsers. A quick google search should yield a converter service for you.
I am recording MP3 using phonegap in an app. Storing the MP3 in a database Base64 Encoded. I can retrieve those records, save them to an MP3 file on phone or computer and play them. Media in phonegap works as well as the local players. What does not work is either
1) playing them directly as base64 on a windows computer in a browser or
2) saving to an MP3 file on the server and playing through the browser.
I gave up and switched to a download button, which works, by storing the MP3 file locally and playing it using the local audio player.
the HTML format I used is
for the file the source was the file path relative to the web root
For the base64 it was "data:audio/mpeg;base64,..."
In all cases it did not work, and the controls were either grayed out or had an error on them.
The solution that works for browser, android, and ios is to use m4a format. In cordova phonegap I used cordova-media-with-compression
My cordova app downloads an audio file from the web. This works fine and the track is being saved in
"cdvfile://localhost/persistent/JukeboxDownloads/Test.mp3"
I get the URL of the file like that inside the success call of my downloader:
entry.toURL();
I then try to play the downloaded file using an audio tag (iOS) like this:
<audio src="file:///Users/Marc/Library/Developer/CoreSimulator/Devices/59AA8A4B-5CE5-42E2-8CF8-7DA0DEB07E99/data/Containers/Data/Application/7406C75B-4509-44C5-A6C7-F71C2D6D27AF/Documents/JukeboxDownloads/Test.mp3" id="audioPlayer" controls>
I also tried to set the src manually using jQuery:
$("#audioPlayer").attr("src","file:///Users/Marc/Library/Developer/CoreSimulator/Devices/59AA8A4B-5CE5-42E2-8CF8-7DA0DEB07E99/data/Containers/Data/Application/7406C75B-4509-44C5-A6C7-F71C2D6D27AF/Documents/JukeboxDownloads/Test.mp3");
However, both did not work for me and I am not able to play the audio, it always says "Error" without further explanation. When I use another source file it works perfectly (that means a file inside my www folder or on the web).
Any ideas why cordova does not play the file?
I would appreciate your help!
Further information: Cordova 5.0;xCode 6.3.1;iOS 8.3
Try referencing the file by creating the src like so:
var src = cordova.file.documentsDirectory + 'JukeboxDownloads/Test.mp3';
I have found that when building the app and rebuilding the referenced GUID for the app changes which causes the URL to be invalid.
In my experience, using cdvfile://localhost/persistent/ works for images but not video or audio files.
I have one .m3u file that points to several .ts files (all in akamai).
Because we give to akamai a live stream, they convert it to these .ts files each of 10s. I see that the m3u files are easy to understand, but I can't find a browser based (flash, html5 or native plugin) player for these files.
If I give to vlc the link of the m3u file, vlc plays all the .ts files one after another as if it where only one big file. I want to use flash or something similar to be able to play in browser, the same way vlc can play those .m3u files.
Is this possible ?
You are basically talking about Apple's HLS format.
You can use an html5 object in your web page. You can use http://osmfhls.kutu.ru/ flash plugin. You can use jwplayer. There are more choices (e.g. flowplayer).
On the Google Drive app for iOS, when I open a video file, I immediately preview the file through a low quality version of it. It's not the original file.
So do you know how to get the url of this preview video?
Thanks a lot
Use the embedLink field of the file. It contains a link to a player that streams the video (YouTube, pretty much), suitable for a mobile app.