+) if Files be located in project that play files is oke
+) else Files be located in folder my computer( E, D or Download...) is not run and Error :searchms.aspx:1491 Uncaught (in promise) DOMException: The element has no supported sources. (play.click(function (e) {
e.preventDefault();
song.play(); // this error
Most if not all browser won't allow a web page to use local files for safety reason. Try F12 Console and you likely have a message telling you it is denied.
Your best bet would to have those files on the web site.
And how do you publish the project to the server ? If using the file system, the creation date is preserved when doing the copy.
If you want to track playtime I would rather register when playback started rather than looking at when the file was created (can't playback start after the file is published/uploaded ?)
None
0 Points
5 Posts
[Asp.net Web Pages] play file mp3, mp4
Jan 12, 2018 04:14 AM|Paula Vu|LINK
I want play file mp3, mp4 on Pages
And I use html5+js+jquery
+) if Files be located in project that play files is oke
+) else Files be located in folder my computer( E, D or Download...) is not run and Error :searchms.aspx:1491 Uncaught (in promise) DOMException: The element has no supported sources. (play.click(function (e) {
e.preventDefault();
song.play(); // this error
});
Participant
780 Points
302 Posts
Re: [Asp.net Web Pages] play file mp3, mp4
Jan 12, 2018 05:00 AM|pon_prabhu|LINK
see below link
https://www.w3schools.com/html/html5_video.asp
None
0 Points
5 Posts
Re: [Asp.net Web Pages] play file mp3, mp4
Jan 12, 2018 05:05 AM|Paula Vu|LINK
I try this way, But problem is
+) if File be located in folder in project is oke
+) else Files be located my computer( E, D or anything..) is not run and error above
Participant
780 Points
302 Posts
Re: [Asp.net Web Pages] play file mp3, mp4
Jan 12, 2018 05:44 AM|pon_prabhu|LINK
What is your code ? how you are trying to access the video which is not belong to your project location ?
None
0 Points
5 Posts
Re: [Asp.net Web Pages] play file mp3, mp4
Jan 14, 2018 12:04 PM|Paula Vu|LINK
Yes,I try access file mp3, mp4 is not belong my project, and run in pages
All-Star
48720 Points
18184 Posts
Re: [Asp.net Web Pages] play file mp3, mp4
Jan 14, 2018 12:12 PM|PatriceSc|LINK
Hi,
Most if not all browser won't allow a web page to use local files for safety reason. Try F12 Console and you likely have a message telling you it is denied.
Your best bet would to have those files on the web site.
None
0 Points
5 Posts
Re: [Asp.net Web Pages] play file mp3, mp4
Jan 15, 2018 12:45 AM|Paula Vu|LINK
Yes, I see this error
But error above is another error
Thank you so much.
None
0 Points
5 Posts
Re: [Asp.net Web Pages] play file mp3, mp4
Jan 15, 2018 02:46 AM|Paula Vu|LINK
Hi,
I want search file(mp3, mp4) use time (that time is time file be created) and after run file in pages.
But if files belong project is use method File.GetCreationTime.. output is time default(this time is wrong).
If Files is not belong project , use method File.GetCreateTime... output is exactly.
SO, YOU HAVE SOLUTION FOR ME?
THANK YOU SO MUCH
All-Star
48720 Points
18184 Posts
Re: [Asp.net Web Pages] play file mp3, mp4
Jan 15, 2018 08:04 AM|PatriceSc|LINK
And how do you publish the project to the server ? If using the file system, the creation date is preserved when doing the copy.
If you want to track playtime I would rather register when playback started rather than looking at when the file was created (can't playback start after the file is published/uploaded ?)