2011-12-15 85 views
0

我想使用html5視頻在本地播放視頻。我不能夠播放視頻和我得到的錯誤是使用Phonegap播放Html5視頻時出錯

+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 

這裏是我寫的代碼:

<!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); 
      } 
     } 
    }); 



} 

}

任何幫助,將不勝感激。

回答