Reputation: 2439
I am working to develop a desktop application for PC using node-webkit. When I run the app with node-webkit everything works great with the exception of the mp4 videos. The html 5 video box pops up, but it is pure white and the controls are grayed-out in the same way it does if I provide a bad file path and run the app in chrome. An example piece of my index.html file:
<div data-role="popup" id="popupVideo" data-overlay-theme="a" data-theme="c" data-tolerance="15,15" class="ui-content">
<video width="497" height="298" style="max-width:100%;" controls>
<source src="base/tutorialvideos//General_Tutorial.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<div class="ui-btn ui-btn-right">
<a href="#popupVideo" data-rel="popup" data-position-to="window" data-role="button" data-icon="info" data-inline="true">Tutorial</a>
</div>
I double-checked the file path several times, and tried all combinations of /, //, \, \ just to be sure. I tried using the full file path instead of the relative with the same results.
I then used a format converter to change one of the videos from .mp4 to .ogv with the same results.
What is really curious, is that I am pretty sure that it IS seeing the videos, because with the code as is posted above, the controls are semi-responsive. I can toggle between play and pause and drag the slider. When I drag the slider to the end, it shows the exact run-time of the video, but still no audio or video.
It just occured to me that jquery mobile could be messing it up, so I'll post this and run a test with pure html 5.
Thanks is advance for any info.
Upvotes: 2
Views: 7624
Reputation: 31
node-webkit only supports patent "free" codecs out of the box. You can however enable mp4/h264 support which is described here: Using MP3 & MP4 (H.264) using the video & audio tags..
Upvotes: 3