Jplayer is not working with mobile Browser (IPAD) - ipad

HI All,
I am working with Jplayer on IPAD, and I have implemented the Jplayer plugin and it is working with all browser with But with IPAD it is showing below error message.
"Error Hint:- Check media URl is valid
Context:- Media URl could not be loaded"
Could anyone help me code snippet is given below. (I have tested with 2.4 also the same error is persisting there as well).
Below is the function inisiatating Jpalyer
startAudio: function() {
var _this = this;
_this.initJPlayerHandlers();
var solution_type = "flash, html";
if($.browser.msie && parseInt($.browser.version, 10) > 8) {
solution_type = "html, flash";
}
_this.jplayer_el.jPlayer({
ready: function() {
$(this).jPlayer(
"setMedia", {
mp3: "/wd/mca.mp3?BID=" + MCA.singletons.self.bid
}).jPlayer("play");
},
supplied: "mp3",
swfPath: "js",
solution: solution_type,
preload: "none"
});
},
I am using IPAD4 having IOS 7 and IPad mini with IOS7.This issue is coming up only with IPAD4.

Autoplay is not supported on iOS and Andriod
JQuery jPlayer autoplay not working on ipad how to show controls
http://www.jplayer.org/latest/quick-start-guide/example-audio-soundtrack/

Related

Safari WebRTC support in IOS 11

We have an application developed using WebRTC in iOS 11, and it says it supports WebRTC but the application is not working in Safari on iOS 11. Is there anything required to do from our end to support this on the Safari browser? Do we have to make any changes in the script? Please help.
Did you got the last adapter.js that assume the browser compatibility ?
Regards
Here is a sample code that worked for me
// create video element first
var video = document.createElement('video');
video.style.width = document.width + 'px';
video.style.height = document.height + 'px';
video.setAttribute('autoplay', '');
video.setAttribute('muted', '');
video.setAttribute('playsinline', '');
document.body.appendChild(video);
//setup your constraints
constraints = {
audio: false,
video: {
facingMode: front
}
}
//ask navigator to allow access
navigator.mediaDevices.getUserMedia(constraints).then(function
success(stream) {
video.srcObject = stream;
});
});

Ionic 2 streaming media plugin not working on iOS

I created a live streaming app, i used the streaming media plugin for playing the videos and it works well on android but it doesn't work on iOS.
The video player open successfully but the video not working and no errors appear in the console.
Link of the plugin
playVideo(url) {
let options: StreamingVideoOptions = {
successCallback: () => { console.log('Finished Video') },
errorCallback: (e) => { console.log('Error: ', e) },
orientation: 'portrait'
};
this.streamingMedia.playVideo(url, options);
}
Use IONIC InAppBrowser instead of StreamingVideoOptions
InAppBrowser Docs
-https://ionicframework.com/docs/native/in-app-browser/
Use this code for ios
const browser = this.iab.create(url, '_self');
browser.show;
Use this code for android
streamingMedia.playVideo(url, options);

iOS 9 can’t play audio/video files that are downloaded to device

Has anyone else had this issue?
When I use the cordova media plugin in order to play an mp3 file on iOS, I get no error or response as to why it's not working.
I've gotten the ngCordova media plugin to work in my app on my ios emulator, using an external URL to play the audio file...however, I'm trying to build some functionality where basically you download the mp3 from an external source, save it to your device, and then play the file from there. I can't seem to get it work, even though I can verify that the file does exist. Here is my code for the function:
$scope.playAudio = function() {
document.addEventListener('deviceready', function () {
var src = cordova.file.dataDirectory + fileSrc;
var media = $cordovaMedia.newMedia(src);
var iOSPlayOptions = {
numberOfLoops: 1,
playAudioWhenScreenIsLocked : true
};
media.play(iOSPlayOptions); // iOS only!
media.play(); // Android
});
}
I should note that this functionality DOES work on my android device, but on both my ios simulator AND real device, it does absolutely nothing.
I should note that I'm using iOS 9 and xCode 7.1
Has anyone else had any issues with trying to play an audio or video file from their local device, in their app?
So it looks like I was able to solve the problem by resolving the local filepath to an internal URL using the $window.resolveLocalFileSystemURL() and src.toInternalURL() functions
$scope.playAudio = function() {
document.addEventListener('deviceready', function () {
var src = cordova.file.dataDirectory + fileSrc;
$window.resolveLocalFileSystemURL(src, function(dir){
basePath = dir.toInternalURL();
media = $cordovaMedia.newMedia(basePath);
var iOSPlayOptions = {
numberOfLoops: 1,
playAudioWhenScreenIsLocked : true
};
$scope.data.playing = true;
media.play(iOSPlayOptions); // iOS only!
//media.play(); // Android
})
});
}

PhoneGap iOS can't play video using HTML 5

I'm building phonegap app and I need to play video in it. I know in order to play video on Android, I need to use one of the plugins available, but to play video on iOS, I can use HTML 5 video tag. I have these lines of code:
<div id="video">
<video id="video01" width="300" height="300" controls>
<source src="images/test2.mp4" type="video/mp4" />
</video>
</div>
I can see "video box", but I cannot play video for some reason. In console I don't see any errors.
Video I'm using is from this page: http://www.quirksmode.org/html5/tests/video.html
And in iPhone Safari I can load MP4 version from that page without any problems.
I know it has been a while, but I was looking at some of my old questions, and I've noticed that I completely forgot to post solution to my problem.
In the end I've managed to fix the issue using Cordova File api, and solution looks smth. like this:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
console.log("gotFS");
getFolder(fileSystem, "video", function(folder) {
filePath = folder.toURL() + "\/" + "videotest.mp4";
playVideo(filePath);
}, function() {
console.log("failed to get folder");
});
},
function() {
console.log("failed to get filesystem");
});
function playVideo(uri) {
var player = document.getElementById("videoPlayer");
var source = document.createElement("source");
source.src = uri;
source.type = "video/mp4";
player.appendChild(source);
player.load();
}

mobile app for interacting with camera with html5?

I want to develop a mobile app for image capturing with camera, initially i wanted to use phonegap and tried downloading and installing the cordovastarter template for my visual studio2010, but all the versiosn of phonegap are giving me the error...'the project type is not supported by this installation' so want to drop the idea of using phonegap, so the next thing is, is it possible to interact with camera using by using only html5 without the help of phonegap?
note:im using mvc3 framework
its very much posible to interact with the camera using HTML5 media API, but the support is not yet confirmed. Hence, might not work as you'd expect:
HTML part:
<video id="video" width="640" height="480" autoplay></video>
<button id="snap">Snap Photo</button>
<canvas id="canvas" width="640" height="480"></canvas>
and the javascript goes like this:
// Put event listeners into place
window.addEventListener("DOMContentLoaded", function() {
// Grab elements, create settings, etc.
var canvas = document.getElementById("canvas"),
context = canvas.getContext("2d"),
video = document.getElementById("video"),
videoObj = { "video": true },
errBack = function(error) {
console.log("Video capture error: ", error.code);
};
// Put video listeners into place
if(navigator.getUserMedia) { // Standard
navigator.getUserMedia(videoObj, function(stream) {
video.src = stream;
video.play();
}, errBack);
} else if(navigator.webkitGetUserMedia) { // WebKit-prefixed
navigator.webkitGetUserMedia(videoObj, function(stream){
video.src = window.webkitURL.createObjectURL(stream);
video.play();
}, errBack);
}}, false);
Hope it helps, source here.

Resources