• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Forcing HTML5 instead of Flash

New Here ,
Jan 19, 2021 Jan 19, 2021

Copy link to clipboard

Copied

We have a few Captivate SCORM packages and we want to edit the code to force HTML5 version. It is already supported and works on Mobile but on PCs it is seeing Adobe Flash enabled (although it recently expired and is not considered there), and fails to load the fallback HTML5. We don't have the source files to edit the project and thus we are trying to edit the .js files to load HTML5 and remove the SWF file.

 

Can you help point out which files to edit to do that? Thanks.

TOPICS
Advanced , Editing

Views

290

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 19, 2021 Jan 19, 2021

The simplest fix for this is to simply delete the code in your multiscreen.html file and replace it with an HTMl redirect that points to the index.html file for the HTML5 content.  That way only the HTML5 content ever gets called. 

https://www.bitdegree.org/learn/html-redirect

 

 

You don't need complex JS code to pull this off, but if you want some directions, see this page:

https://www.w3schools.com/howto/howto_js_redirect_webpage.asp

 

Likes

Translate

Translate
Community Expert ,
Jan 19, 2021 Jan 19, 2021

Copy link to clipboard

Copied

The simplest fix for this is to simply delete the code in your multiscreen.html file and replace it with an HTMl redirect that points to the index.html file for the HTML5 content.  That way only the HTML5 content ever gets called. 

https://www.bitdegree.org/learn/html-redirect

 

 

You don't need complex JS code to pull this off, but if you want some directions, see this page:

https://www.w3schools.com/howto/howto_js_redirect_webpage.asp

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 21, 2021 Jan 21, 2021

Copy link to clipboard

Copied

I am having the same issue here is a sample code of the multiscreen.html file below. Little help on which line I am suppose to redict to html 5

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name='viewport' content='initial-scale = 1, minimum-scale = 1, maximum-scale = 1'/>
<title></title>
<script type="text/javascript">
function isHandheldDevice()
{
var lDevicesUserAgents = ["blackberry","android","iphone","ipad","symbian","smartphone","ios","windows ce","webos"];
var lDeviceUserAgentString = navigator.userAgent.toLowerCase();
for(var i=0; i < lDevicesUserAgents.length; ++i)
{
if(lDeviceUserAgentString.indexOf(lDevicesUserAgents[i]) != -1)
return true;
}
return false;
}
function OnLoad_Activities(){
var isHandheld=isHandheldDevice();
var lParamString = window.location.toString().split("?")[1];
if(lParamString != undefined)
lParamString = "?" + lParamString;
else
lParamString = "";
if (isHandheld){
document.getElementById("frame1").src="index.html" + lParamString;
}
else
document.getElementById("frame1").src="untitled1.htm" + lParamString;
}

function DoCPExit()
{
if(window != window.parent && window.parent && window.parent.hasOwnProperty("DoCPExit"))
{
window.parent.DoCPExit();
}
else
{
if(window.top == self)
{
var win = window.open("","_self");
win.close();
}
else
{
var win = window.top.open("","_self");
win.top.close();
}
}
}

function IsRunningInConnect()
{
if(!document.location || !document.URL || !document.referrer)
return false;
return (document.location.href.indexOf("airspeed") != -1 || document.URL.indexOf("airspeed") != -1 || document.referrer.indexOf("airspeed") != -1)
}

</script>
</HEAD>
<frameset rows="100%,0%,0%,0%,0%" onload="OnLoad_Activities()" border="0">
<frame width="100%" height="100%" id="frame1" name="content" src="">
</frameset>
<noframes>
Your browser must be able to view frames for this content to display.
</noframes>
</html>

 

 

Thank you in advance if you have a suggestion. This HTML5/SWF is causing havoc on our LMS and its not detecting the HTML 5 content and we don't have the original files to republish.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2021 Jan 22, 2021

Copy link to clipboard

Copied

Unfortunately, you waited until your content failed before addressing this issue rather than getting in early and fixing it when you had plenty of time time during the past few years, even though the death of Flash was warned about many times.

 

If your content is set up as SCORM for delivery from an LMS, just delete all the code out of your multiscreen.html file and replace it with this:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url='index_scorm.html'" />
</head>
<body>
</body>
</html>

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 08, 2022 Mar 08, 2022

Copy link to clipboard

Copied

LATEST

Better use se Javascript&colon;

 

window.location.replace('http://example.com');

 

It’s better than using window.location.href = ‘http://example.com’;

Using replace() is better for javascript redirect because it does not keep the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button fiasco.

If you want to simulate someone clicking on a link, use window.location.href

If you want to simulate an HTTP redirect, use window.location.replace

You can use assign() and replace methods also to javascript redirect to other pages like the following:

 

location.assign("http://example.com");

 

The difference between replace() method and assign() method(), is that replace() removes the URL of the current document from the document history, means it is not possible to use the “back” button to navigate back to the original document. So Use the assign() method if you want to load a new document, andwant to give the option to navigate back to the original document.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines