<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#container {
height: 100%;
width: 50%;
display: inline-block;
}
</style>
</head>
<body>
<div id="container"></div>
<script src="lib/three.js/three.custom.min.js"></script>
<!-- Include the Hammer.js library -->
<script src="lib/hammer.js/hammer.js"></script>
<!-- Include the ForgeJS library -->
<script src="lib/forge/forge.js"></script>
<script>
// Create a viewer
function StartPlayVideo() {
var config = {
"story":
{
"uid": "story-0",
"name": "Video Controls",
"slug": "video-controls",
"description": "This is a project sample with video controls plugin",
"default": "scene-0",
"scenes":
[
{
"uid": "scene-0",
"name": "First scene",
"slug": "first-scene",
"description": "This is the first scene",
"media":
{
"uid": "video-0",
"type": "video",
"source":
{
"format": "equi",
"url": "Route1.mp4",
},
"options":
{
"autoPlay": false,
"loop": true,
"volume": 0.5
}
},
"view":
{
"type": "GoPro"
},
"plugins":
{
"instances":
[
{
"uid": "org.forgejs.videocontrols-0",
"engine": "org.forgejs.videocontrols",
"data": {},
"keep": false,
"index": 1
}
]
}
}
]
},
"events": {
"onStart ": ['hi'
]
},
"plugins":
{
"enabled": true,
"prefix": "/plugins/",
"engines":
[
{
"uid": "org.forgejs.videocontrols",
"url": "VideoControls/"
}
]
}
}
var viewer = new FORGE.Viewer("container", config);
function onReadyHandler() {
viewer.story.onSceneLoadComplete.add(onSceneLoadCompleteHandler);
}
function onSceneLoadCompleteHandler() {
var media = viewer.story.scene.media;
if (media.type === FORGE.MediaType.VIDEO) {
var video = media.displayObject;
video.onTimeUpdate.add(onTimeUpdateHandler);
}
}
function onTimeUpdateHandler(data) {
// console.log(data.emitter.remainingTime)
console.log(data.emitter.currentTime)
//viewer.story.nextScene();
}
viewer.onReady.addOnce(onReadyHandler);
}
StartPlayVideo();
</script>
</body>
</html>
ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one help me
-
- Posts: 11
- Joined: Wed Sep 06, 2017 10:20 am
-
- Posts: 11
- Joined: Wed Sep 06, 2017 10:20 am
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
its local video and i test with another published video and have same problem when i remove code belong to events it run on chrome but with code of event not run
aaa
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
I've run your sample with current develop version of the library and it works on Chrome Windows. I can see the console.log linked to the time updates.
Are you under macOS ?
Are you under macOS ?
-
- Posts: 11
- Joined: Wed Sep 06, 2017 10:20 am
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
no iam on windows 10 not mac i download plugin version from github may it the problem ? because i use another pc and have same problem
aaa
-
- Posts: 11
- Joined: Wed Sep 06, 2017 10:20 am
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
forge.js:2303 Uncaught UID configuration not valid, uid story-0 already have an object binded to! this error in console
aaa
-
- Posts: 11
- Joined: Wed Sep 06, 2017 10:20 am
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
[img]
[/img]- Attachments
-
- this error please advise me thanks in advance for support :)
- Capture.PNG (23.26 KiB) Viewed 19939 times
aaa
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
It sounds like you have a duplicate uid in your configuration.
Please check how many times you have "story-0" as uid in the configuration.
All uid have to be unique!
Please check how many times you have "story-0" as uid in the configuration.
All uid have to be unique!
- Raphaël
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
No issue on my side with your code above.
It seems that there is a double or more instantiation of the same viewer and so the "story-0" UID is already present in your case.
Have you change something to your code sample above ?
On each THREE.WebGLRenderer 86 into the console the viewer is instantiated for information.
It seems that there is a double or more instantiation of the same viewer and so the "story-0" UID is already present in your case.
Have you change something to your code sample above ?
On each THREE.WebGLRenderer 86 into the console the viewer is instantiated for information.
-
- Posts: 11
- Joined: Wed Sep 06, 2017 10:20 am
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
yes this error because i change call function and put it inside for loop thanks in advance for Ur support 

aaa
Re: ask about code run on fire fox and not run on chrome the same code for video player with event timer can any one hel
So is it possible to send me the code used into it's latest version to see if I can change something, because on my side i've no issue with your code above?
Who is online
Users browsing this forum: No registered users and 1 guest