2011-12-15 8 views
0

html5ビデオを使用してローカルでビデオを再生しようとしています。Phonegapを使用してHtml5ビデオを再生する際にエラーが発生しました

<!DOCTYPE html> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<title>Video</title> 

</head> 
<body> 
<video id="video" autobuffer height="480" width="500" controls onclick="this.play()"> 
<source src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb_trailer_360p.webm?b"></source> 
</video> 

</body> 
</html> 

とAndroidアクティビティ:

public class VideoCatalogActivity extends DroidGap { 
    /** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 

    super.loadUrl("file:///android_asset/www/index.html"); 
    appView.setDownloadListener(new DownloadListener() 
    { 
     public void onDownloadStart(String url,String userAgent,String contentDisposition, String mimeType, long size) 

     { 
       Intent viewIntent = new Intent(Intent.ACTION_VIEW); 
       viewIntent.setDataAndType(Uri.parse(url), mimeType); 
       try 
       { 
       startActivity(viewIntent); 
      } 
       catch (ActivityNotFoundException ex) 
      { 
        Log.w("YourLogTag", "Couldn't find activity to view mimetype: " + mimeType); 
      } 
     } 
    }); 



} 
私はビデオを再生することはできないと私は取得していますエラーがここ

+12-15 12:53:30.620: INFO/SqliteDatabaseCpp(388): sqlite returned: error code = 14, msg = cannot open file at line 27701 of [8609a15dfa], db=/data/data/com.canvasm.video/databases/webview.db 
    +12-15 12:53:30.620: INFO/SqliteDatabaseCpp(388): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27701 - "" errno=2 path=/CachedGeoposition.db, db=/data/data/com.canvasm.video/databases/webview.db 

であることは、私が書いたコードです

}

ご協力いただければ幸いです。

答えて

2

AndroidのWebViewでビデオタグが壊れています。この問題を回避するために、私はVideoPlayerプラグインを作成しました。これは、インラインビデオを再生しませんが、それは何もないよりはましである:あなたの助けサイモンため

http://simonmacdonald.blogspot.com/2011/11/video-player-plugin-for-phonegap.html

+1

感謝を。しかし、html5

+0

今のところ、ビデオタグがウェブビューで壊れているため、 –

関連する問題