我似乎無法得到在科爾多瓦2.7.0上的Android上工作的視頻播放器。我試圖在https://github.com/macdonst/VideoPlayer上使用videoPlayer插件。我花了幾個小時試圖獲得「hello World」類型的視頻播放功能,並且遇到了路徑問題。我遵循自述文件的指示,但仍然收到「Uncaught TypeError:無法讀取未定義屬性'videoPlayer'」。我也在java文件的src-> com-> phonegap-> plugins->視頻位置出錯。我試過VideoPlayer.java文件的多個位置,但都給我錯誤。我已將該行包含在XML文件中,並且video.js文件位於我的www根目錄中。幫幫我!videoPlayer插件不工作科爾多瓦2.7.0 - Android
視頻 「Hello World」 的例子中,我使用:
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=320; user-scalable=yes" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>PhoneGap</title>
<script type="text/javascript" charset="utf-8" src="cordova-2.7.0.js"></script>
<script type="text/javascript" charset="utf-8" src="video.js"></script>
<script type="text/javascript">
function init(){
document.addEventListener("deviceready", devRdy, true);
}
function devRdy() {
console.log("**************");
console.log("**************");
console.log("**************");
console.log("the device is ready");
console.log("**************");
console.log("**************");
console.log("**************");
}
function playVideo(vidUrl) {
window.plugins.videoPlayer.play(vidUrl);
}
</script>
</head>
<body onload="init();">
<a href="#" onclick="playVideo('http://www.flabber.nl/sites/flabber.nl/files/PingPongakaTableTennisSD.mp4')">Play HTTP</a><p/>
</body>
</html>
這將是很好,如果你能在這一問題提出的項目結構。您提供的[link](https://lh4.googleusercontent.com/-kvILYakcBc0/Uay7dd7tx9I/AAAAAAAAAFU/NKnTf9psHvs/w1341-h566-no/Screenshot.png)似乎已經死亡。這可以證明對其他人在stackoverflow.com上有價值 – dotnetCarpenter