Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello,
I created a custom widget in order to integrate the OvenMedia WebRTC player (https://airensoft.gitbook.io/ovenplayer/). I included the Third part javascript and the player is starting on my local computer but not in the production environment. What could be the problem & how can I analyze this?
Development environment: Thingworx 9.1.0-b10877
Production environment: Thinworx 9.2.5-b308
The code to import the ovenmedia js and start the player is the following one:
this.renderHtml = function () {
$("body").append('<script type="text/javascript" src="../Common/extensions/OvenPlayer/ui/OvenPlayer/include/ovenplayer.js"></script>');
var html = '<div class="player-wrapper"><div id="player_id"></div><div id="player_label">TEST</div></div>';
return html;
};
this.afterRender = function () {
document.getElementById("player_label").innerHTML = "DEBUG1.3";
OvenPlayer.debug(true);
document.getElementById("player_label").innerHTML = OvenPlayer.getPlayerList().length;
var player = OvenPlayer.create('player_id', {
sources: [
{
label: 'label_for_webrtc',
// Set the type to 'webrtc'
type: 'webrtc',
// Set the file to WebRTC Signaling URL with OvenMediaEngine
file: 'ws://10.10.10.10:3334/mystream/arm' //updatePropertyInfo.StreamURL
}
]
});
document.getElementById("player_label").innerHTML = player;
player.play();
document.getElementById("player_label").innerHTML =OvenPlayer.getPlayerList();
};
Solved! Go to Solution.
Yes, I also don't see that it should behave differently on windows.
Hm, on the spot I also don't have any direct idea. What I would try:
I think the only issue can be that this ovenplayer.js file is not loaded correctly from what we can see.
Do you have the same custom extensions and widgets imported on both dev and prod servers? We have seen in the past that sometimes due to custom extensions, widgets don't work as expected.
It was not the case but I imported the missing extensions on dev and it is still the case. It seems that the Third part js is not loaded at all on prod.
Any other idea on How to debug this?
I would check in the developer console (F12) in the network tab if the overplayer.js is being loaded correctly. I assume the path may not be correct so it will result in a 404 error? Is the OS different from DEV to PROD as it may handle caseSensitiveness different for the path?
Hi,
we can see on the screenshot attached at the top that overplayer.js seems not to be loaded. I tried several path without success but I'm wondering that this is working well on my computer.
There is a 404 error on both systems, prod and dev, but this is related to the file ovenplayer.js.map that is not necessary. There is no 404 error related to the file ovenplayer.js.
The OS are Windows 10 and if I remember well Windows 12, so the behavior should be similar?
Yes, I also don't see that it should behave differently on windows.
Hm, on the spot I also don't have any direct idea. What I would try:
I think the only issue can be that this ovenplayer.js file is not loaded correctly from what we can see.
Hi,
1. the js-console doesn't show anything
2. This is it, importing it in the meta data works also on prod!
Thank you for your help!