Sencha Touch 2 + PhoneGap + iPad: base64 encoded video: "Operation could not be completed"

My application (wrapped in PhoneGap) works both online and offline. I store images and videos encoded in base64 in localstorage. When I debug this in the browser, it works fine, but on the iPad it screams “Operation could not be completed” in javascript promt.

I tried to post a video with a clean html tag and True Ext.Video.

Am I missing something? Thanks

newhtml += "<video width='320' height='240' controls='controls'> <source src='data:video/mp4;base64,"+tmpStore.getAt(i).data.myPages[j].myProducts[k].myItens[0].fileData+"' /></video>"; 

Update:

Tested in the native browsers iPad and Android 3.0, and the result is the same: "Operation ...". Tested with and without autoplay and controllers (in video / source tags).

+6
source share
2 answers

PhoneGap does not recognize the video tag.

+2
source

You forgot the TYPE attribute: type="video/mp4" in the source element.

And for some reason, it starts working on Android when you do it: src='data:video/mp4;base64,AAAA' [Don't ask why AAAA, I don't know. Found it somewhere and it helped me]

Hope this helps someone.

+1
source

Source: https://habr.com/ru/post/914348/


All Articles