我使用英特尔XDK和UI jQuery Mobile的,我想在我的英特尔XDK项目播放视频,但它是不是在玩开发混合应用程序,我如果我提到这个样本http://qnimate.com/playing-videos-in-intel-xdk-app/点击播放按钮,什么都不会发生,即使我在我的项目加入播放器插件视频不是英特尔XDK玩
我使用这个代码
<!DOCTYPE html>
<html>
<head>
<title>Video Player</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<style>
@-ms-viewport { width: 100vw ; zoom: 100% ; }
@viewport { width: 100vw ; zoom: 100% ; }
@-ms-viewport { user-zoom: fixed ; }
@viewport { user-zoom: fixed ; }
</style>
<script src="lib/ft/fastclick.js"></script>
<link rel="stylesheet" href="css/app.css">
</head>
<body>
<button onclick="playVideo();">Play Video</button>
<script src="intelxdk.js"></script>
<script src="cordova.js"></script>
<script src="xhr.js"></script>
<script src="js/app.js"></script>
<script src="js/init-app.js"></script>
<script src="js/init-dev.js"></script>
<script>
function playVideo()
{
//this function launches default video player and plays the video.mp4 file.
intel.xdk.player.playPodcast("http://labs.qnimate.com/video.mp4");
}
document.addEventListener("intel.xdk.player.podcast.start", function(){
//started playing video
alert("start");
}, false);
document.addEventListener("intel.xdk.player.podcast.stop", function(){
//video finished or player closed
alert("stop");
}, false);
document.addEventListener("intel.xdk.player.podcast.error", function(){
//error occured therefore video cannot be played
alert("error");
}, false);
document.addEventListener("intel.xdk.player.podcast.busy", function(){
//another video is already being played
alert("busy");
}, false);
</script>
</body>
</html>
你能帮我什么问题?
你是否包括必要的插件作为项目的一部分? – xmnboy
@xmnboy我加入播放器插件在我的项目,我们还有什么需要包括哪些内容? –
我做了调试跟踪,它似乎要进入插件并调用正确的东西,但我不能快速调试本地代码。我的猜测是插件可能有问题。我会请负责的工程师来看看。 – xmnboy