I am trying to play a mp4 video in the bootstrap modal pop-up.
The video is placed in the folder of my project.
The problem is , when I give the path of the video from the project's folder , nothing happens i.e. the video is not played :
Here is the snapshot of the pop-up
I tried the following code :
<!-- Modal HTML -->
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h5 class="modal-title">SECRETS OF SUPERIOR CUSTOMER SERVICE (July 22, 2016)</h5>
</div>
<div class="modal-body">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="<%= ResolveUrl("~") %>Departments/HR/Presentations/Credit/csp_pre.mp4"></iframe>
</div>
</div>
</div>
</div>
</div>
But , if I change the Src to some thing like :
.mp4
The video is played .
What could be the problem ?
as the video is playing fine when I give the source from any online link.
Please help me .
Thanks in advance
EDIT:
I also tried video
tag instead of iframe
but still problem is same if i give the source from folder :
<div class="modal-body">
<div class="embed-responsive embed-responsive-16by9">
<video autoplay loop class="embed-responsive-item">
<source src="<%= ResolveUrl("~") %>Departments/HR/Presentations/Credit/csp_pre.mp4" type="video/mp4">
</video>
</div>
</div>
I am trying to play a mp4 video in the bootstrap modal pop-up.
The video is placed in the folder of my project.
The problem is , when I give the path of the video from the project's folder , nothing happens i.e. the video is not played :
Here is the snapshot of the pop-up
I tried the following code :
<!-- Modal HTML -->
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h5 class="modal-title">SECRETS OF SUPERIOR CUSTOMER SERVICE (July 22, 2016)</h5>
</div>
<div class="modal-body">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="<%= ResolveUrl("~") %>Departments/HR/Presentations/Credit/csp_pre.mp4"></iframe>
</div>
</div>
</div>
</div>
</div>
But , if I change the Src to some thing like :
http://techslides./demos/sample-videos/small.mp4
The video is played .
What could be the problem ?
as the video is playing fine when I give the source from any online link.
Please help me .
Thanks in advance
EDIT:
I also tried video
tag instead of iframe
but still problem is same if i give the source from folder :
<div class="modal-body">
<div class="embed-responsive embed-responsive-16by9">
<video autoplay loop class="embed-responsive-item">
<source src="<%= ResolveUrl("~") %>Departments/HR/Presentations/Credit/csp_pre.mp4" type="video/mp4">
</video>
</div>
</div>
Share
Improve this question
edited Jul 26, 2016 at 4:25
Alina Anjum
asked Jul 25, 2016 at 11:00
Alina AnjumAlina Anjum
1,2306 gold badges31 silver badges57 bronze badges
1 Answer
Reset to default 1Try to replace iframe with "video" and "source" tags as show below.
<video autoplay loop class="embed-responsive-item">
<!--replace this sample with your video-->
<source src="http://techslides./demos/sample-videos/small.mp4" type="video/mp4">
</video>
double check your path please. It works for me.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745277548a4620126.html
评论列表(0条)