Buggy code:
public class Html5Video extends CordovaPlugin { private static final String TAG = "Html5VideoCordovaPlugin" ; public final String ACTION_INITIALIZE = "initialize" ; public final String ACTION_PLAY = "play" ; public final String ACTION_SETVIDEO_URL = "setVideoUrl" ; Html5Video . FileDataStore dataStore = new Html5Video . FileDataStore ( ) ; @ Override public boolean execute ( String action , JSONArray args , final CallbackContext callbackContext ) throws JSONException { boolean status = false ; if ( action . equals ( ACTION_INITIALIZE ) ) { String packageName = this . cordova . getActivity ( ) . getPackageName ( ) ; JSONObject videos = args . getJSONObject ( 0 ) ; JSONArray tagNames = videos . names ( ) ; JSONObject convertedVideos = new JSONObject ( ) ; if ( tagNames != null ) { for ( int i = 0 ; i < ( tagNames . length ( ) ) ; i ++ ) { String [ ] video = videos . getString ( tagNames . getString ( i ) ) . split ( "\\." ) ; String newUrl = null ; if ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . KITKAT ) ) { String newFilePath = dataStore . getFilePath ( video [ 0 ] ) ; if ( newFilePath != null ) { newUrl = "file:////" + newFilePath ; Log . d ( Html5Video . TAG , ( "Using<seq2seq4repair_space>KitKat,<seq2seq4repair_space>can't<seq2seq4repair_space>load<seq2seq4repair_space>local<seq2seq4repair_space>videos.<seq2seq4repair_space>Loading<seq2seq4repair_space>from:<seq2seq4repair_space>" + newUrl ) ) ; } } if ( newUrl == null ) { int videoId = this . cordova . getActivity ( ) . getResources ( ) . getIdentifier ( video [ 0 ] , "raw" , packageName ) ; newUrl = ( ( "android.resource:////" + packageName ) + "//" ) + videoId ; } convertedVideos . put ( tagNames . getString ( i ) , newUrl ) ; LOG . d ( "Html5Video" , ( ( ( "Id:<seq2seq4repair_space>" + ( tagNames . getString ( i ) ) ) + "<seq2seq4repair_space>,<seq2seq4repair_space>src:<seq2seq4repair_space>" ) + ( convertedVideos . getString ( tagNames . getString ( i ) ) ) ) ) ; } callbackContext . sendPluginResult ( new PluginResult ( Status . OK , convertedVideos ) ) ; status = true ; } } else if ( action . equals ( ACTION_PLAY ) ) { final String videoId = args . getString ( 0 ) ; if ( videoId != null ) { cordova . getActivity ( ) . runOnUiThread ( new Runnable ( ) { public void run ( ) { webView . loadUrl ( ( ( "javascript:window.plugins.html5Video._play(" + videoId ) + ")" ) ) ; } } ) ; status = true ; LOG . d ( "Html5Video" , ( "Playing<seq2seq4repair_space>video<seq2seq4repair_space>with<seq2seq4repair_space>id:<seq2seq4repair_space>" + videoId ) ) ; } } else if ( action . equals ( ACTION_SETVIDEO_URL ) ) { final String videoId = args . getString ( 0 ) ; final String videoFileId = args . getString ( 1 ) ; if ( videoFileId != null ) { cordova . getActivity ( ) . runOnUiThread ( new Runnable ( ) { public void run ( ) { <START_BUG> webView . loadUrl ( ( ( ( ( "javascript:window.plugins.html5Video._setVideoUrl(" + videoId ) + ",<seq2seq4repair_space>" ) + videoFileId ) + ")" ) ) ; <END_BUG> } } ) ; status = true ; LOG . d ( "Html5Video" , ( ( ( "Setting<seq2seq4repair_space>src<seq2seq4repair_space>of<seq2seq4repair_space>html<seq2seq4repair_space>video<seq2seq4repair_space>id<seq2seq4repair_space>" + videoId ) + "<seq2seq4repair_space>with<seq2seq4repair_space>video<seq2seq4repair_space>id:<seq2seq4repair_space>" ) + videoFileId ) ) ; } } return status ; } @ Override public Object onMessage ( String id , Object data ) { } private class FileDataStore { public String getFilePath ( String rawFileName ) { } private boolean copyResourceFileToDataDir ( String rawFileName , String newFileName ) { } } }

Fix:
webView . loadUrl ( ( ( ( ( "javascript:window.plugins.html5Video._setVideoUrl(" + videoId ) + ",<seq2seq4repair_space>'" ) + videoFileId ) + "')" ) ) ;