I'm building an app in Cordova where the first page of the app contains a video tag set to autoplay. I don't get any 404 errors loading the file... The file just won't play. The video is just black with a 0:00 time length that doesn't change.
The strange thing is I get two network requests in Chrome remote dev tools for the video file: the first shows a (success) status, and the second has a status of (cancelled). I've tried using two different URLs for the file:
file:///android_asset/www/video/nameofmyvideo.mp4 with the video file actually in /www/video/nameofmyvideo.mp4.
and
android.resource://mypackagename/raw/nameofmyvideo with the video file actually in /www/res/raw/nameofmyvideo and /platforms/android/res/raw/nameofmyvideo
I'm running the latest cordova (3.4.1-0.1.0) and testing on a kindle fire running CM-11 (4.4.2).
Here's the the markup I'm using:
HTML:
<video width="400px" height="300px" autoplay controls>
<source src="file:///android_asset/www/video/video-test.mp4" type="video/mp4">
</video>
OR
HTML:
<video width="400px" height="300px" autoplay controls>
<source src="android.resource://my.package.name/raw/videotest" type="video/mp4">
</video>
Is this an android pathing issue? The app runs fine as-is in iOS. I've also tried using webm, with no success.
Also it seems that the double network load issue (one success, one cancelled) happens regardless of whether the file can actually load. I loaded the same mp4 file over http hosted on my website and the video played fine (but still showed both requests).
Try using a relative path instead...
HTML:
<source src="video/video-test.mp4" type="video/mp4">
This is obviously assuming you're in the root folder - I'm guessing you're still in index.html in the www folder.
I dont think phonegap / browser can play mp4 files. Its a limitation of cross platform. Try flv format
Sent from my Nexus 4 using XDA Premium 4 mobile app
jaison thomas said:
I dont think phonegap / browser can play mp4 files. Its a limitation of cross platform. Try flv format
Sent from my Nexus 4 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
That's not correct - it's a regular html5 browser control, which is capable of playing mp4 videos.
.MP4 is supported, not .FLV.
http://developer.android.com/guide/appendix/media-formats.html
It looks like the Android Web view is blocking access to the video files, which this Cordova plugin fixes:
Http://github.com/jaeger25/Html5Video
This plugin is for Android only. You could probably make changes to the JavaScript to make it work on other platforms.
Sent from my SM-N900V using XDA Free mobile app
I experimented with that plugin and couldn't get it to work. Maybe reverting back to an older version of Cordova would work.
Sent from my SM-N900V using XDA Free mobile app
DieHappy said:
I experimented with that plugin and couldn't get it to work. Maybe reverting back to an older version of Cordova would work.
Sent from my SM-N900V using XDA Free mobile app
Click to expand...
Click to collapse
Did you get any further with this? I'm currently experiencing the same problem. All the possible solutions found online tell me to include the video files in the app's folder, but in my case the video's need to be downloaded afterwards so they can't be in the app's folder...
I have the same problem, even developing an Android cross walk application, the video Html5 tag only works fine with videos located in a http server, with local files includes in the application only works in full screen mode, otherwise only the audio is played, the video is showed as a black screen.
I think the issue is related to the Web browser of Android, I tested the application in the latest version of the chrome Mobile browser and the behaviour is exactly the same.
Did you find a solution for this issue?
Thanks a lot in advance.
Regards
David
Hi,
I've recently released an open source app that uses html5 video player and a mp4 video.
Check the app in store using the links at zland.io
After starting the app, close the dialog and click on the (?) question sign in the upper right corner, then click on "crosshair explained".
To see how its done clone github.com/zland/zland-help-overlay and check the file components/HelpOverlay.jsx
HTML:
<video controls style={videoStyle}>
<source src="assets/zland-help-overlay/videos/crosshair.mp4"
type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"' />
</video>
The video is done with android built in video capturing and then edited with iMovie.
@ddiegomercado cordova recently introduced a Content-Security-Policy module. For development be sure to set it to:
HTML:
<meta http-equiv="Content-Security-Policy" content="">
in your index.html
This means the webview can load content from anywhere.
Also be sure to install cordova-plugin-whitelist and set this to your config.xml
HTML:
<!-- access origin -->
<plugin name="cordova-plugin-whitelist" version="1" />
<access origin="*" />
Thanks a lot, I will try
Hey,
i cant run 1080p Videos on my Amazon Fire TV with xbmc. It constantly rebuffers and keeps lagging/stuttering.
I tried changing some things with the advancedsettings.xml but it didn't work out.
I'm using the Kodi 14.0 Helix Alpha 4 but I also tried Gotham and SPMC - Always the same problem with 1080p files.
I dont know what I can do to fix this.
Maybe someone has the same Problem and got some idea?
thanks in advance
Macfelix
WiFi?
Macfelix said:
Hey,
i cant run 1080p Videos on my Amazon Fire TV with xbmc. It constantly rebuffers and keeps lagging/stuttering.
I tried changing some things with the advancedsettings.xml but it didn't work out.
I'm using the Kodi 14.0 Helix Alpha 4 but I also tried Gotham and SPMC - Always the same problem with 1080p files.
I dont know what I can do to fix this.
Maybe someone has the same Problem and got some idea?
thanks in advance
Macfelix
Click to expand...
Click to collapse
What did you try in the advanced settings file? Did you try the <network> commands?
for example:
<network>
<cachemembuffersize>20971520</cachemembuffersize> <!-- number of bytes used for buffering streams ahead in memory
{{subst:Name}} will not buffer ahead more than this. WARNING: for the bytes set here, {{subst:Name}} will consume 3x the amount of RAM
When set to 0 the cache will be written to disk instead of RAM, as of v12 Frodo -->
<buffermode>0</buffermode> <!-- Choose what to buffer:
0) Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.) (default)
1) Buffer all filesystems (including local)
2) Only buffer true internet filesystems (streams) (http, etc.)
3) No buffer -->
<readbufferfactor>1.0</readbufferfactor> <!-- this factor determines the max readrate in terms of readbufferfactor * avg bitrate of a video file.
This can help on bad connections to keep the cache filled. It will also greatly speed up buffering. Default value 1.0. -->
</network>
If ou google up on xbmc video buffering lots of info on this.
ashmanmb said:
What did you try in the advanced settings file? Did you try the <network> commands?
for example:
<network>
<cachemembuffersize>20971520</cachemembuffersize> <!-- number of bytes used for buffering streams ahead in memory
{{subst:Name}} will not buffer ahead more than this. WARNING: for the bytes set here, {{subst:Name}} will consume 3x the amount of RAM
When set to 0 the cache will be written to disk instead of RAM, as of v12 Frodo -->
<buffermode>0</buffermode> <!-- Choose what to buffer:
0) Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.) (default)
1) Buffer all filesystems (including local)
2) Only buffer true internet filesystems (streams) (http, etc.)
3) No buffer -->
<readbufferfactor>1.0</readbufferfactor> <!-- this factor determines the max readrate in terms of readbufferfactor * avg bitrate of a video file.
This can help on bad connections to keep the cache filled. It will also greatly speed up buffering. Default value 1.0. -->
</network>
If ou google up on xbmc video buffering lots of info on this.
Click to expand...
Click to collapse
I am sorry do we just copy and paste this into a notepad file or do ew takeout some things?
Hi everyone. I'm spanish, sorry for my basic english.
I have TCL c715 tv.
My best favorite app to see the films with image and synopsis is KODI. In the settings of this app, video is only in 1080p (i can't change it), and sound only give stereo. But it is not a problem from the app with the sound, because all the apps that i prove give stereo too (flex, youtube, mx video...). I prove all options: change to 5.1, passtrough... But the sound is always in stereo.
I think kodi don't give me 4k because i can't change the resolution in settings. And when a play a 4k film, kodi rescale to 1080p. But this is my appreciation.
When a play any movie in the native player's tv, there's no problem with sound, the sound problem is only on androidtv.
The settings of androidtv don't have video or sounds options (like nvidia shield, for example).
Is there any rom or flash to get more options on androidtv to get 4k and home theater sound for that tv?
Thanks.
04Drizzt said:
Hi everyone. I'm spanish, sorry for my basic english.
I have TCL c715 tv.
My best favorite app to see the films with image and synopsis is KODI. In the settings of this app, video is only in 1080p (i can't change it), and sound only give stereo. But it is not a problem from the app with the sound, because all the apps that i prove give stereo too (flex, youtube, mx video...). I prove all options: change to 5.1, passtrough... But the sound is always in stereo.
I think kodi don't give me 4k because i can't change the resolution in settings. And when a play a 4k film, kodi rescale to 1080p. But this is my appreciation.
When a play any movie in the native player's tv, there's no problem with sound, the sound problem is only on androidtv.
The settings of androidtv don't have video or sounds options (like nvidia shield, for example).
Is there any rom or flash to get more options on androidtv to get 4k and home theater sound for that tv?
Thanks.
Click to expand...
Click to collapse
Same problem here with the 5.1 audio. I already spent too many hours trying to solve this.
Videos sent via Chromecast work correctly with dolby audio.
Some users reported that connecting an external source via HDMI (like an android box) also works correctly.
Obiusly a PC or a android box do they work. But, when i pay for a tv with androidtv, this work iqual that this equipments. I think androidtv in these TVs are limited.
I hope that somebody can flash it to work without limits (unfortunately, we can't wait great things from the trademark)
I also have to say that i have conected the tv with hdmi arc at the onkyo system sound.
Well. Have to wait.
Update here:
Files with E-AC3 work correctly (to 5.1) via ARC to my receiver.
I tried with Kodi and Plex and multiple files and all behaved the same way.
The results are [input file -> output on the receiver via ARC]:
AC3 -> Stereo
EAC3 -> 5.1
TrueHD -> Stereo
This is stupid.
fjrdomingues said:
Update here:
Files with E-AC3 work correctly (to 5.1) via ARC to my receiver.
I tried with Kodi and Plex and multiple files and all behaved the same way.
The results are [input file -> output on the receiver via ARC]:
AC3 -> Stereo
EAC3 -> 5.1
TrueHD -> Stereo
This is stupid.
Click to expand...
Click to collapse
I had get a sample mkv with eac3, and work for me too. But in others codecs only stereo.
Unfortunately, in spain, all of the movies are in ac3 or dts.
This maybe means that the problem is in Kodi?
Kodi works too with eac3 if you enable eac3 passthrough in the settings.
My guess is that TCL implemented this to be compatible with Netflix (which uses eac3) and ignored the other formats.
Hi everyone.
I have find a solution for this model by using the native player.
In the configuration of android in the tv, you can find the aplications that are installed in the tv, included the apps of the system. One of the app is the native player and, in the setting, I could see the folder (com.tcl.videoplayer).
Well, I have made the next xml to tell kodi that play the movies with the native player, wich is the one that works without any problem:
<playercorefactory>
<players>
<player name="TCL" type="ExternalPlayer" audio="true" video="true">
<filename>com.tcl.videoplayer</filename>
<hidexbmc>true</hidexbmc>
<playcountminimumtime>120</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule video="true" player="TCL"/>
</rules>
</playercorefactory>
When you do this xml, copy in a pendrive and put in the usb of the tv, open kodi and select the gear symbol from the left top of the main menu.. Then select Media Settings from the Kodi Settings. Click General and enable the option called “Show Hidden Files and Directories” to show the hidden files. Then go back to settings and Select File Manager. Then, Scroll down and select Profile Directory in the left side. In the right side select add source to add the pendrive. And copy the xml to the userdata folder.
Restart kodi and now kodi will play the movies with the native player of the tv.
I hope this help you.
Hi everyone.
I have find a solution for this model by using the native player.
In the configuration of android in the tv, you can find the aplications that are installed in the tv, included the apps of the system. One of the app is the native player and, in the setting, I could see the folder (com.tcl.videoplayer).
Well, I have made the next xml to tell kodi that play the movies with the native player, wich is the one that works without any problem:
<playercorefactory>
<players>
<player name="TCL" type="ExternalPlayer" audio="true" video="true">
<filename>com.tcl.videoplayer</filename>
<hidexbmc>true</hidexbmc>
<playcountminimumtime>120</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule video="true" player="TCL"/>
</rules>
</playercorefactory>
When you do this xml, copy in a pendrive and put in the usb of the tv, open kodi and select the gear symbol from the left top of the main menu.. Then select Media Settings from the Kodi Settings. Click General and enable the option called “Show Hidden Files and Directories” to show the hidden files. Then go back to settings and Select File Manager. Then, Scroll down and select Profile Directory in the left side. In the right side select add source to add the pendrive. And copy the xml to the userdata folder.
Restart kodi and now kodi will play the movies with the native player of the tv.
I hope this help you.
04Drizzt said:
Hi everyone.
I have find a solution for this model by using the native player.
In the configuration of android in the tv, you can find the aplications that are installed in the tv, included the apps of the system. One of the app is the native player and, in the setting, I could see the folder (com.tcl.videoplayer).
Well, I have made the next xml to tell kodi that play the movies with the native player, wich is the one that works without any problem:
<playercorefactory>
<players>
<player name="TCL" type="ExternalPlayer" audio="true" video="true">
<filename>com.tcl.videoplayer</filename>
<hidexbmc>true</hidexbmc>
<playcountminimumtime>120</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule video="true" player="TCL"/>
</rules>
</playercorefactory>
When you do this xml, copy in a pendrive and put in the usb of the tv, open kodi and select the gear symbol from the left top of the main menu.. Then select Media Settings from the Kodi Settings. Click General and enable the option called “Show Hidden Files and Directories” to show the hidden files. Then go back to settings and Select File Manager. Then, Scroll down and select Profile Directory in the left side. In the right side select add source to add the pendrive. And copy the xml to the userdata folder.
Restart kodi and now kodi will play the movies with the native player of the tv.
I hope this help you.
Click to expand...
Click to collapse
what name should i give to xml file ??
tushkachudasama said:
what name should i give to xml file ??
Click to expand...
Click to collapse
playercorefactory.xml
04Drizzt said:
playercorefactory.xml
Click to expand...
Click to collapse
well thanx i tried but another issue i am facing aspect ratio of some 4k movies
see same as https://forum.xda-developers.com/t/...y-tcl-beyondtv-beyondtv.4025755/post-84196091
tushkachudasama said:
well thanx i tried but another issue i am facing aspect ratio of some 4k movies
see same as https://forum.xda-developers.com/t/...y-tcl-beyondtv-beyondtv.4025755/post-84196091
Click to expand...
Click to collapse
In settings of tv I go to image, advanced, screen settings. I turn on or off the automatic format depending of the movie. And chosse in aspect ratio 16/9 (this option work if automatic format is off).
If the image start to look bad when you make changes, just stop it and play it again.
I hope this help you.
One question on the topic of non working AC3 output via arc. I'm using dreamplayer for android tv to stream channels and recordings from an enigma2 receiver at home. Also here I noticed that the sound is only shown as PCM Stereo 2.0 on the connected sonos beam. Is there a way to get this also working? The preinstalled Prime Video app as also the Disney+ app are able to passthrough AC3 so I would expect there is some permission missing on the dreamplayer app.
Kody is an app that it's make by people. Dream player it's make by a company and it's very difficult to reprogram it.
As far as I know all apps in androidtv for this tv work only in stereo (youtube, mxplayer, plex...).
Kody is the app that can be modificated by people to work in diferent plataforms.
Perhaps you could be to send a email to the owner of the app.
But as I wrote before Disney+ and Prime Video work on mine with AC3-Passthrough and I rather doubt that Amazon and Disney wrote own apps for this tv, or?
I think the error is by TCL. I wrote them, but they don't answer me.
This problem it have Sony tv too. And, in some models, they have corrected it.
Nvidia shield have androidtv too. And, in their system, are options for sound.
Hello i have similar problems. MY tv is TCL 65C715 and recently sound is not coming through PCM and Passthrough to onkyo receiver via hdmi arc. Auto option gives only stereo sound
Same problem here, half a year later... Will check if Kodi hack works and update!
04Drizzt said:
Hi everyone.
I have find a solution for this model by using the native player.
In the configuration of android in the tv, you can find the aplications that are installed in the tv, included the apps of the system. One of the app is the native player and, in the setting, I could see the folder (com.tcl.videoplayer).
Well, I have made the next xml to tell kodi that play the movies with the native player, wich is the one that works without any problem:
<playercorefactory>
<players>
<player name="TCL" type="ExternalPlayer" audio="true" video="true">
<filename>com.tcl.videoplayer</filename>
<hidexbmc>true</hidexbmc>
<playcountminimumtime>120</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule video="true" player="TCL"/>
</rules>
</playercorefactory>
When you do this xml, copy in a pendrive and put in the usb of the tv, open kodi and select the gear symbol from the left top of the main menu.. Then select Media Settings from the Kodi Settings. Click General and enable the option called “Show Hidden Files and Directories” to show the hidden files. Then go back to settings and Select File Manager. Then, Scroll down and select Profile Directory in the left side. In the right side select add source to add the pendrive. And copy the xml to the userdata folder.
Restart kodi and now kodi will play the movies with the native player of the tv.
I hope this help you.
Click to expand...
Click to collapse
Hello, this would be perfect solution, but now it says this all the time, would you advise how to fix it? Many thanks in advance!
rafsteam said:
Same problem here, half a year later... Will check if Kodi hack works and update!
Click to expand...
Click to collapse
Did that work for you? For me it works only when starting the movie from USB directly (via Kodi of course), but not for streams (starting movies from SCC)