now my webapp works like this : users click the button, then app will post a url to get video from internet.
my purpose is: when sdcard have the video that users want to see, app will not ask the internet but play the local video.
then with crosswalk(this is a very good frame), I find the method "shouldInterceptLoadRequest",i can do something when i use the method to get every url that app prepare to send.
but after my handle, i need to return a XWalkWebResourceResponse by using createXWalkWebResourceResponse(String mimeType, String encoding, InputStream data).
however here come the question code:
InputStream inputStream = new FileInputStream(filePath);
return createXWalkWebResourceResponse("video/*","UTF-8",inputStream);
this code does not work, and the player still get the internet video rather than local video.
i am wonder where i am wrong? i am sure that read/write premission is all set and the filepath is real(i make a mediaplayer demo to play the mp4file and succeed).
i try to read the input stream by getData(),and also succeed, that means the xwalkwebresourceresponse has data, but why the data does not work?
please someone that know where i am wrong could tell me which place is wrong.i have search the document, website and any place i can search but still can not find how to solve it.