thomassturm / videosub Goto Github PK
View Code? Open in Web Editor NEWHTML5 Video with SRT Subtitles
License: Other
HTML5 Video with SRT Subtitles
License: Other
In order to manipulate subtitle text, an event should be dispatched to the DOM when subtitles change. Will submit a pull request with my changes for this.
Currently, the subtitle text is updated every time the timeupdate
event is fired, even if it does not replace any text.
Will send a pull-request.
I have following error with console log, when i put the library video not displaying, Can any one know the where's the problem,,,?
ERROR: NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
MY CODE:
<video controls preload="metadata" id="video1">
<source src="videos/02_06_05.mp4" type="video/mp4" />
<source src="videos/02_06_05.webm" type="video/webm" />
<track src="jellies.srt" kind="subtitle" srclang="en-US" label="English" />
</video>
JS: videosub.JS
This is a problem if you're building a library which may or may not have video on page load. For example in any modern javascript application.
Simple fix - in videosub_main add this as the second line:
if(!myVideo) {
return;
}
and then add below the domReady call:
$VIDEOSUB.fn.videosub = videosub_main;
So the code is callable when needed. In fact I'd suggest removing the dom call entirely.
I was looking for Ajax-driven SMI library to attach subtitle for every (including HTML5 video) online video, and yours are the best one. However, SRT is kinda non-standard format and SMI is more popular. Do you have any plan to implement SMI support? Also, do you have any plan to let users implement subtitle area manually? It's needed, if I don't use
Thanks.
Won
If VideoSub can play Youtube then VideoSub is better video HTML5 Player
HTML:
<video id="mainVideo" width="600" height="360" controls="stop">
<source src="video.mp4" type="video/mp4"/>
<track src="subtitles.srt" kind="subtitle" srclang="en-US" label="English" />
Your browser does not support HTML5 video.
</video>
JS:
<script src="js/videosub.js"></script>
JS console:
Uncaught TypeError: Cannot read property '0' of undefined videosub.js:155
(anonymous function) videosub.js:155
f videosub.js:34
Subtitles actually do get displayed correctly, but the error message above could be indicative of some underlying badness.
.srt
when i run program with VS 2013 it work fine in Mozilla and IE but it doesn't work with google chrome ,subtitle not shown in case of chrome.(videosub-0.9.9.js used)
In project videosub-0.9.9.js library was added,is there need to do more changes ? so i can make work srt file in google chrome.
Example followed link:- http://www.storiesinflight.com/js_videosub/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.