Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-12-19 09:55 AM
Hi all,
I am trying to code switching src attribute of video html tag using buttons in Custom iView,
I have following code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script language="javascript">
function load_vid_01(){
document.getElementById("srcMp4").src = "video/2.mp4";
document.getElementById("srcOgg").src = "video/2.mp4";
document.getElementById("trainVid").load();
}
</script>
</head>
<body>
<div class="mainBox">
<div class="leftBox">
<ul class="buttons">
<li>
<button onclick="load_vid_01()">
Button Content
</button>
</li>
</ul>
</div>
<div class="rightBox">
<video controls align="right" id="trainVid">
<source src="video.mp4" type="video/mp4" id="srcMp4">
<source src="video.ogg" type="video/ogg" id="srcOgg">
Your browser does not support the video tag.
</video>
</div>
</div>
</body>
</html>
which is working in editors like jsfiddle but seems to not work in Archer Custom iView. I am new to customizing his views so I am not sure what I am missing. Source src attribute is not being updated with following function.
2018-12-19 10:01 AM
If it works locally it's because your video files are most likely in the same location/path - "video/2.mp4"
However, Archer on a server won't know that path.
2018-12-19 10:11 AM
I am providing full patch to video in src attribute and trying to change it to other one in the same format. (in ex.
src="<example.site - full path.com>/vid01.mp4 to
src="<example.site - full path.com>/vid02.mp4)
2018-12-19 10:19 AM
HTML5 limitation?
What do you see when you look at debugger tools in your browser console window?
2018-12-19 10:25 AM
"HTTPS security is compromised by <my provided path>".
What I also forgot to mention is that tag itself work properly, if I provide src in Source tag directly, video is loading properly, just function that switch this attribute is not working.
2018-12-19 11:21 AM
This is an IE issue when it encounters mixed content: HTTP and HTTPs.
2018-12-19 02:35 PM
Do you suggest any workaround ?
2018-12-19 02:38 PM
Mm, probably you need to use the same protocol and files maybe located on the Archer server.
2018-12-19 02:59 PM
I thought you were using HTTPS even for the videos.
So, other than being on the same server (hopefully, you're on-prem for this).
The only other thing I could think of would be a hyperlink to an internal site that contains the videos.
I gotta believe that the video exists in more than one place.
I was also wondering about creating a new tab or pop-up with it embedded, but I don't know if these solutions would give you the same issue. I haven't done much with video so a little at a loss there.
2018-12-19 03:53 PM
I think there's also a option for iviews to have video.
Maybe you can use that and point the user to the iview?