html5 video element - how can I get its name
I am writing an html5 video play-list based on开发者_如何学Go video.js and need to display the name of the current video. While I can easily get some meta-data such as the clip's duration using the js API, the name is no where to be found. Any suggestion?
If with the name you mean the file name (only name you can extract from the file itself), you can verify the src attribute of the tag. Remember to remove the URL part and keep only what's after the last '/'.
Otherwise you must send the name to the client side (maybe using microdata?).
精彩评论