You are not logged in.

di0deman

Beginner

Posts: 12

Location: Republic of Korea

  • Send private message

241

Wednesday, June 14th 2023, 3:17am

The sign of the wheeldelta value on the touch device is reversed.

Hi Klaus,

I'm working on a project that uses wheeldelta values.


The project works on the three devices listed below.

  • Desktop with mouse
  • Desktop with touch device
  • Mobile
There was no problem until version 1.20.11 of krpano.


1. When using a touch device, if the version of krpano is 1.21, the sign of the wheeldelta value is reversed.
2. When the version of krpano is 1.21, the desktop cannot detect the touch device.

The code to test is written as below.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<krpano version="1.20.11"
             title="Virtual Tour"
             logkey="true"
             debugmode="true"
             >

    <events name="test_events"
                 keep="true"
                 onmousewheel="test_onmousewheel()"
                />

    <action name="test_onmousewheel">
        trace('wheeldelta=', get(wheeldelta), ', wheeldelta_raw=', get(wheeldelta_raw), ', wheeldelta_touchscale=', get(wheeldelta_touchscale), ', device.touch=', get(device.touch));
    </action>

    <preview type="grid(cube,32,32,512,0xCCCCCC,0xFFFFFF,0x999999);" />

</krpano>



The image below is the log of the zoom in operation when the krpano version is 1.20.11.
The code above was tested on a desktop with a touch device.



The image below is the log of the zoom out operation when the krpano version is 1.20.11.
The code above was tested on a desktop with a touch device.



The image below is the log of the zoom in operation when the krpano version is 1.21.
The code above was tested on a desktop with a touch device.



The image below is the log of the zoom out operation when the krpano version is 1.21.
The code above was tested on a desktop with a touch device.



wheeldelta example in krpano 1.20.11

wheeldelta example in krpano 1.21


Refer to the image below for the touch device installed on the desktop.

This post has been edited 1 times, last edit by "di0deman" (Aug 27th 2023, 5:03am)


di0deman

Beginner

Posts: 12

Location: Republic of Korea

  • Send private message

242

Wednesday, June 14th 2023, 3:40am

The performance of the videoplayer plugin is slow.

Hi Klaus,

The code to test is written as below.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<krpano version="1.20.11"
             title="Virtual Tour"
             logkey="true"
            debugmode="true"
            >
    <include url="skin/vtourskin.xml" />

    <!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
    <skin_settings maps="false"
                   maps_type="google"
                   maps_bing_api_key=""
                   maps_google_api_key=""
                   maps_zoombuttons="false"
                   maps_loadonfirstuse="true"
                   gyro="true"
                   gyro_keeplookingdirection="false"
                   webvr="true"
                   webvr_keeplookingdirection="true"
                   webvr_prev_next_hotspots="true"
                   autotour="false"
                   littleplanetintro="false"
                   followmousecontrol="false"
                   title="true"
                   thumbs="true"
                   thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
                   thumbs_opened="false"
                   thumbs_text="false"
                   thumbs_dragging="true"
                   thumbs_onhoverscrolling="false"
                   thumbs_scrollbuttons="false"
                   thumbs_scrollindicator="false"
                   thumbs_loop="false"
                   tooltips_buttons="false"
                   tooltips_thumbs="false"
                   tooltips_hotspots="false"
                   tooltips_mapspots="false"
                   deeplinking="false"
                   loadscene_flags="MERGE"
                   loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
                   loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
                   loadscene_blend_next="SLIDEBLEND(0.5,   0, 0.75, linear)"
                   loadingtext=""
                   layout_width="100%"
                   layout_maxwidth="814"
                   controlbar_width="-24"
                   controlbar_height="40"
                   controlbar_offset="20"
                   controlbar_offset_closed="-40"
                   controlbar_overlap.no-fractionalscaling="10"
                   controlbar_overlap.fractionalscaling="0"
                   design_skin_images="vtourskin.png"
                   design_bgcolor="0x2D3E50"
                   design_bgalpha="0.8"
                   design_bgborder="0"
                   design_bgroundedge="1"
                   design_bgshadow="0 4 10 0x000000 0.3"
                   design_thumbborder_bgborder="3 0xFFFFFF 1.0"
                   design_thumbborder_padding="2"
                   design_thumbborder_bgroundedge="0"
                   design_text_css="color:#FFFFFF; font-family:Arial;"
                   design_text_shadow="1"
                   />

    <!--
        For an alternative skin design either change the <skin_settings> values
         from above or optionally include one of the predefined designs from below.
    -->
    <!-- <include url="skin/vtourskin_design_flat_light.xml"  /> -->
    <!-- <include url="skin/vtourskin_design_glass.xml"       /> -->
    <!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
    <!-- <include url="skin/vtourskin_design_117.xml"         /> -->
    <!-- <include url="skin/vtourskin_design_117round.xml"    /> -->
    <!-- <include url="skin/vtourskin_design_black.xml"       /> -->

        <style name="style_embeded_video"
           url.html5="%VIEWER%/plugins/videoplayer.js"
           url.flash="%VIEWER%/plugins/videoplayer.swf"
           edge="center"
           scale="1.0"
           rx="0"
           ry="0"
           rz="0"
           ox="0"
           oy="0"
           loop="true"
           pausedonstart="false"
           muted="true"
           />

    <scene name="scene_plaza" title="plaza" onstart="" thumburl="panos/plaza.tiles/thumb.jpg" lat="" lng="" heading="">

                <control bouncinglimits="calc:image.cube ? true : false" />

        <view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

        <preview url="panos/plaza.tiles/preview.jpg" />

        <image>
            <cube url="panos/plaza.tiles/pano_%s.jpg" />
        </image>

        <hotspot name="extract_vod01" style="style_embeded_video" videourl="videos/Apgujoeng_PlazaA_Krpano.mp4" videourl.mobile="videos/Apgujoeng_PlazaA_Krpano.mp4" posterurl="" distorted="true" width="1920" height="1080" scale="0.64"  ath="90.287"   atv="35.963" rotate="0" enabled="false" locked="true" zorder="1"/>
        <hotspot name="extract_vod02" style="style_embeded_video" videourl="videos/Apgujoeng_PlazaB_Krpano.mp4" videourl.mobile="videos/Apgujoeng_PlazaB_Krpano.mp4" posterurl="" distorted="true" width="1920" height="1080" scale="0.586" ath="-87.580"  atv="36.009" rotate="0" enabled="false" locked="true" zorder="1"/>
        <hotspot name="extract_vod03" style="style_embeded_video" videourl="videos/Apgujoeng_PlazaC_Krpano.mp4" videourl.mobile="videos/Apgujoeng_PlazaC_Krpano.mp4" posterurl="" distorted="true" width="1920" height="1080" scale="0.52"  ath="-178.453" atv="32.365" rotate="0" enabled="false" locked="true" zorder="1"/>
        <hotspot name="extract_vod04" style="style_embeded_video" videourl="videos/Apgujoeng_PlazaD_Krpano.mp4" videourl.mobile="videos/Apgujoeng_PlazaD_Krpano.mp4" posterurl="" distorted="true" width="1920" height="1080" scale="0.521" ath="-3.025"   atv="30.654" rotate="0" enabled="false" locked="true" zorder="1"/>
    </scene>

</krpano>


3D-distorted hotspot with videoplayer example in krpano 1.20.11.
3D-distorted hotspot with videoplayer example in krpano 1.21.

In the version of krpano is 1.21, the hotspot's video stops or slows down within about 2 to 10 minutes.

This post has been edited 1 times, last edit by "di0deman" (Aug 27th 2023, 4:58am)


243

Wednesday, June 14th 2023, 9:14am

I could not load this page from europe
ERROR: videos/Apgujoeng_PlazaD_Krpano.mp4 - loading video failed!
really bad response time...

244

Wednesday, June 14th 2023, 12:39pm

Hi everyone,

this is my first post on the forum. *smile*

Thanks for the example with comparing panoramas! It is great.


But I have questions:

1. Is it possible to add hotspots to the left or right panorama? I tried this code below, but unfortunately it doesn't work (they are added when displaying a normal single panorama, not when comparing).

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<scene name="pano1" title="Pano 1" onstart="" thumburl="panos/pano1.tiles/thumb.jpg" lat="" lng="" heading="">
    <image>
    	<preview url="panos/pano1.tiles/preview.jpg" />
    	<cube url="panos/pano1.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg" multires="512,640,1152,2304" />
    </image>
    <hotspot name="spot_01" title="Title 1" style="skin_hotspotstyle_test" ath="-46.359" atv="2.553" zorder="9" 	onhover="showtext('Text 1', STYLE_HOTSPOT);" />
</scene>

<scene name="pano2" title="Pano 2" onstart="" thumburl="panos/pano2.tiles/thumb.jpg" lat="" lng="" heading="">
    <image>
    	<preview url="panos/pano2.tiles/preview.jpg" />
    	<cube url="panos/pano2.tiles/%s/l%l/%v/l%l_%s_%v_%h.jpg" multires="512,640,1152,2304" />
    </image>
    <hotspot name="spot_02" title="Title 2" style="skin_hotspotstyle_test" ath="-50.359" atv="2.553" zorder="9" 	onhover="showtext('Text 2', STYLE_HOTSPOT);" />
</scene>

<view hlookat="50" fovtype="dfov" fov="120" />

<layer name="krpano1container" type="container" safearea="false" x="0%" width="50%" height="100%" maskchildren="true" enabled="false" zorder="0">
    <layer name="krpano1" type="krpano" align="left" width="200%" height="100%"
    onloaded="krpano.actions.loadxml(('&lt;krpano&gt;' + scene[0].content + '&lt;/krpano&gt;'),null,IMAGEONLY);"
    />
</layer>

<layer name="krpano2container" type="container" safearea="false" x="50%" width="50%" height="100%" maskchildren="true" enabled="false" zorder="0">
    <layer name="krpano2" type="krpano" align="right" width="200%" height="100%"
    onloaded="krpano.actions.loadxml(('&lt;krpano&gt;' + scene[1].content + '&lt;/krpano&gt;'),null,IMAGEONLY);"
    />
</layer>



2. I'm not sure if this is a bug, but on a mobile device after opening the example, when the screen is rotated, fullscreen mode is activated and the buttons to change the panorama comparison mode disappear.
Also, only one panorama appears after rotation, not two. When the smartphone is vertical and I change the mode to, for example, Side-by-Side, and then rotate it to horizontal - two panoramas are already displayed side by side and buttons are visible too.

Screenshots:







This post has been edited 2 times, last edit by "pano_dave" (Jun 14th 2023, 3:34pm)


245

Thursday, June 22nd 2023, 9:54am

Change cubelabels Default value with letters to numeric for files (output sequence)

VTOUR CONFIG xmls / I'm currently trying to find the correct syntax to change the %s placeholder (image.cubelabels with default value l|f|r|b|u|d) or otherwise to change the lettered sequence value of sides to numerical (like 0|1|2|3|4|5). Can't find the right solution for # generate faces images / customimage[image].path=%INPUTPATH%/image_%s.jpg for output image_0.jpg image_1.jpg and etc. Thank you... if anyone knows the correct syntax

PanoramicWEB

Intermediate

Posts: 192

Location: Turkey

Occupation: 360 Software and Hardware Developing

  • Send private message

246

Friday, June 23rd 2023, 8:01pm

Hi Klaus,
i find small bug for alphachannel.
if i use prealign in image and hotspot have prealign="true" ,then that hotspot is turning ry axis .



Source code

1
2
3
4
5
6
<image prealign="0|80|0">			....... 		</image> 
<hotspot name="sbs"  url="alphachannel_sbs.jpg" 
alphachannel="SBS"
 distorted="true"	
 capture="false" ath="-15" 
prealign="true"		scale="0.5"		/>




And another problem if i use alphachannel video hotspot, that hotspot always volume = 1 , i can not changei. if i make muted="true", then sound is muted.

This post has been edited 2 times, last edit by "PanoramicWEB" (Jun 23rd 2023, 9:24pm)


247

Saturday, June 24th 2023, 4:34pm

<layer name="inf_l" type="text" keep="true" edge="bottom" oy="-20" enabled="false" bgalpha="0.3"
onloaded="show_distance(); delayedcall(0.01, onloaded());" />

<action name="show_distance" scope="local" >
screentodepth( mouse.x, mouse.y, hit);
copy(caller.x, mouse.x);
copy(caller.y, mouse.y);
calc(caller.html, 'mouse hit.d=' + roundval(hit.d, 1));
</action>pint_r mouse hit.d = 0 I am in STL model, don't know where is wrong, no hit *confused*

This post has been edited 1 times, last edit by "worinima2128" (Jun 24th 2023, 5:14pm)


248

Monday, June 26th 2023, 5:33am

Upgrading from 1.20 to 1.21 loading error: Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross origin data, and may not be loaded.

1.21 is missing 'Origin' in Request Headers compared to 1.20




---------------------------------------------------
Today's new discovery: This may be a bug. If it is a complete protocol address (starting with [http://]or [https://]), it is normal, but using a relative protocol address (starting with [//]) will cause this problem.

This post has been edited 3 times, last edit by "MANJAY" (Jun 27th 2023, 5:28am)


249

Friday, June 30th 2023, 1:02pm

Can 'mouse_3d_cursor' also work on the mobile end?

Can 'mouse_3d_cursor' also work on the mobile end?

250

Friday, July 21st 2023, 5:15am

Tween

is distance func support when tweening multiple variables ?

di0deman

Beginner

Posts: 12

Location: Republic of Korea

  • Send private message

251

Monday, July 31st 2023, 3:09am

The onwheel(or onmousewheel) of predefined event never called on a layer set to enablechildren="false"(or children).

Hi Klaus,

The code to test is written as below:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<krpano version="1.20.11"
  title="Virtual Tour"
  logkey="true"
  debugmode="true"
  >


  <events name="test_events"
    keep="true"
    onmousewheel="test_onmousewheel()"
    />

  <layer name="test_layer1"
    keep="true"
    type="image"
    url="0_6_0.jpg"
    children="false"
    onclick="trace('click test_layer1')"
    >
      <layer name="test_layer2"
        type="image"
        url="0_6_0.png"
        onclick="trace('click test_laye2')"
        />
  </layer>

  <action name="test_onmousewheel">
    trace('wheeldelta=', get(wheeldelta), ', wheeldelta_raw=', get(wheeldelta_raw), ', wheeldelta_touchscale=', get(wheeldelta_touchscale), ', device.touch=', get(device.touch), ', device.touchsupport=', get(device.touchsupport), ', device.mouse=', get(device.mouse));
  </action>

  <preview type="grid(cube,32,32,512,0xCCCCCC,0xFFFFFF,0x999999);" />

</krpano>


The test_onmousewheel action called on krpano 1.20.11 but, never called on krpano 1.21.

children example in krpano 1.20.11

children example in krpano 1.21.

Eric Chen

Trainee

Posts: 68

Location: China

Occupation: Krpano custom coding

  • Send private message

252

Monday, July 31st 2023, 5:55pm

Found a fov zoom bug with the trackpad

Hi Klaus,
I found that in the <flat>, the tow-finger pinch operation on trackpad doesn't work and I couldn't zoom. But it works fine in <cube>. I ran the same test with your examples, and the results were the same.

https://krpano.com/releases/1.21/viewer/krpano.html?xml=examples/demotour-apartment/tour.xml
https://krpano.com/krpano.html?xml=panos/rom/trevifountain/flat.xml


events.ongesture wasn't triggered on trackpad.

wheeldelta_touchscale Once pinched on the trackpad, the value is persisted. After using the mouse wheel, the value will remain the same.
*thumbup*

Preload Plugin (Free, source code)
Constrast Plugin
KR HLS Plugin
Slider Controller Plugin
KR+Next+MapBox+TS Demo (source code)


微信:Eric_Chen1990

This post has been edited 1 times, last edit by "Eric Chen" (Aug 1st 2023, 11:06pm)


di0deman

Beginner

Posts: 12

Location: Republic of Korea

  • Send private message

253

Wednesday, August 2nd 2023, 10:44am

The bgbordermode attribute of layer doesn't work correctly.

Hi Klaus,

https://krpano.com/docu/xml/?version=121#layer.bgbordermode

I am testing the bgbordermode attribute.

I set the value of bgbordermode to "inside", but it doesn't work properly.

It still shows the same result as set to "outside".

254

Tuesday, August 8th 2023, 7:33pm

您是否考虑过加载 3dtile

Douglas Rhiner

Intermediate

Posts: 141

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

255

Monday, August 14th 2023, 10:37pm

v1.20 vs v1.21 plugin.sprite.appendChild() issue.

Klaus and KRPano fam,

Got a strange mystery that I just can't debug.

I have created a plugin, leveraging socket.io, Agora and a few other components that is similar in nature to the Live Presenter Plugin but definitely different. We use the term conference for a presentation session.
It works great using krpano 1.20.11 (build 2022-03-07). A host can start a conference and then the audience/participants can join in via a conference-specific URL.
HOWEVER, when I use krpano 1.21 (build 2023-04-30) the <div> I'm appending to the sprite just won't append. I've traced and console.log()-ed to an obscene extent trying to figure this one out to no avail.
Obviously this has something to do with host - vs - audience/participants but what just does not jive out is why does this work with v1.20 and not with v1.21?
No code changes what-so-ever. Just the core KRPano version change.
Below is the relevant code in the plugin that creates the <div> and appends to the plugin.sprite.
And below that is the log and elements for both the "host" and the "audience/participant".
You can see in the logs that the appending seems to go down, with theResults being traced in both instances.
But the following log lines host-VM61:56 and participand-VM36:56 indicate that that host was appended-to while the participant WAS NOT.

If anyone can shed light or point me in any direction on this it would be GREATLY appreciated.

// create the wrapping div
confdiv = document.createElement('div');
confdiv.style.width = '100%'; // => automatic scale with the parent element
confdiv.style.height = '400px';
confdiv.style.overflowY = 'hidden';
confdiv.style.overflowX = 'hidden';
confdiv.id = 'confdiv';
confdiv.style.position = 'absolute';
confdiv.style.bottom = '0px';
confdiv.style.display = 'flex';
confdiv.style.flexDirection = 'column';
confdiv.style.justifyContent = 'flex-end';
confdiv.style.pointerEvents = 'none';
// add it to the DOM
if (plugin.sprite) {
const theResults = plugin.sprite.appendChild(confdiv);
consolelog('Adding confidiv to the DOM', 2);
console.log(theResults);
} else {
consolelog('NO SPRITE', 2);
}
consolelog(window.location.hostname);
if ($('#confdiv').length > 0) {
consolelog('CONFDIV EXISTS ONLOAD', 2);
} else {
consolelog('CONFDIV DOES NOT EXISTS ONLOAD', 2);
}

Host log
VM61:56 ------ SECONDARY | Adding confidiv to the DOM
VM61:62 <div id=​"confdiv" style=​"width:​ 100%;​ height:​ 400px;​ overflow:​ hidden;​ position:​ absolute;​ bottom:​ 0px;​ display:​ flex;​ flex-direction:​ column;​ justify-content:​ flex-end;​ pointer-events:​ none;​">​</div>​flex
VM61:56 --- PRIMARY | preview.xplorit.local
VM61:56 ------ SECONDARY | CONFDIV EXISTS ONLOAD


Host elements
<div style="position: absolute; box-sizing: content-box; overflow: visible; opacity: 1; cursor: pointer; pointer-events: auto; background: none; visibility: visible; border-color: rgb(0, 0, 0); border-style: solid; border-width: 0px; border-radius: 0px; z-index: 163; width: 320px; height: 70px; transform: translateZ(0px) translate(1514px, 778px) translate(0px, 0px);">
<div style="position: absolute; box-sizing: content-box; overflow: visible; opacity: 1; cursor: pointer; pointer-events: auto; z-index: 118; background: none no-repeat; visibility: visible; width: 320px; height: 70px; transform: translateZ(0px) translate(0px, 0px) translate(0px, 0px);">
<div id="confdiv" style="width: 100%; height: 400px; overflow: hidden; position: absolute; bottom: 0px; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none;">
<!-- Chat Content -->
</div>
</div>
</div>




Participant log
VM36:56 ------ SECONDARY | Adding confidiv to the DOM
VM36:62 <div id=​"confdiv" style=​"width:​ 100%;​ height:​ 400px;​ overflow:​ hidden;​ position:​ absolute;​ bottom:​ 0px;​ display:​ flex;​ flex-direction:​ column;​ justify-content:​ flex-end;​ pointer-events:​ none;​">​</div>​
VM36:56 --- PRIMARY | preview.xplorit.local
VM36:56 ------ SECONDARY | CONFDIV DOES NOT EXISTS ONLOAD


Participant element
<div style="position: absolute; box-sizing: content-box; overflow: visible; opacity: 1; cursor: pointer; pointer-events: auto; background: none; visibility: visible; border-color: rgb(0, 0, 0); border-style: solid; border-width: 0px; border-radius: 0px; z-index: 165; width: 320px; height: 70px; transform: translateZ(0px) translate(1514px, 778px) translate(0px, 0px);">
</div>





256

Tuesday, August 15th 2023, 8:48am

Hi,

what's the related xml or plugin including code?

Maybe the plugin.sprite element wasn't added to the DOM yet, when you're trying to get it from there...
Or the plugin has a parent layer element that was loaded and added yet?
There can be multiple reasons, there is no guarantee that a plugin.sprite would be anytime added on the DOM...

Best regards,
Klaus

Douglas Rhiner

Intermediate

Posts: 141

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

257

Wednesday, August 16th 2023, 11:59pm

Klaus,

The layer/plugin is created dynamically with the action below.

Below that I have the JS console output for both v1.20 and v1.21 runs with this.The only dif in the logs being where the resetMap() is logged.
I added in the traces, first to see if a layer[xplorit_conference] already exists ( which it should not ) and second to see if the layer[xplorit_conference] ends up being created. I also did this for the other layer/plugin being added by this action.
In both cases, v1.20 & 1.21 the PRE and POST checks PASS.
Now, in ATTENDEE 1.21 when I check pugin-side to see if the div was added to the DOM it is not, as reported by:
VM28:56 ------ SECONDARY | CONFDIV DOES NOT EXISTS ONLOAD

The ONLY thing that changed when I ran these two comparisons is switching out the krpano.js versions. No code was altered what-so-ever.
As much as this could be something in the sequencing of my code, the version discrepancy really has me confused here.

<action name="load_xplorit_conference">
trace('load_xplorit_conference()');
<!-- set the socket stage to capture mouse events -->
set(layer[socket_stage].capture, true);
set(layer[socket_stage].enabled, true);
set(layer[socket_stage].bgcapture, true);
<!-- add the two layers/plugins that are needed for the conferencing module -->
if(layer[xplorit_conference],
trace('xplorit_conference PRE CHECK - FAILED!');
,
trace('xplorit_conference PRE CHECK - PASSED!');
);
addlayer(xplorit_conference);
set(layer[xplorit_conference].type, plugin);
set(layer[xplorit_conference].parent, layer[socket_stage]);
set(layer[xplorit_conference].with, 100%);
set(layer[xplorit_conference].height, 100%);
set(layer[xplorit_conference].align, leftbottom);
set(layer[xplorit_conference].x, 0);
set(layer[xplorit_conference].y, 0);
set(layer[xplorit_conference].keep, true);
set(layer[xplorit_conference].visible, true);
set(layer[xplorit_conference].alpha, 1.0);
set(layer[xplorit_conference].enabled, true);
set(layer[xplorit_conference].capture, true);
set(layer[xplorit_conference].bgcapture, false);
set(layer[xplorit_conference].zorder, 0);
set(layer[xplorit_conference].room, %1);
set(layer[xplorit_conference].mode, %2);
set(layer[xplorit_conference].url,'/xplorit_common/frameworks/xplorit/plugins/xplorit_conference.min.js');
set(layer[xplorit_conference].onloaded, conf_nav_open());

if(layer[xplorit_conference],
trace('xplorit_conference POST CHECK - PASSED!');
,
trace('xplorit_conference POST CHECK - FAILED!');
);

if(layer[conf_overlay],
trace('conf_overlay PRE CHECK - FAILED!');
,
trace('conf_overlay PRE CHECK - PASSED!');
);

addlayer(conf_overlay);
set(layer[conf_overlay].keep, true);
set(layer[conf_overlay].align, righttop);
set(layer[conf_overlay].width, 100%);
set(layer[conf_overlay].height, 100%);
set(layer[conf_overlay].x, 0);
set(layer[conf_overlay].y, 0);
set(layer[conf_overlay].visible, true);
set(layer[conf_overlay].alpha, 1.0);
set(layer[conf_overlay].enabled, false);
set(layer[conf_overlay].capture, false);
set(layer[conf_overlay].bgcapture, false);
set(layer[conf_overlay].zorder, 1);
set(layer[conf_overlay].cursor, pointer);
set(layer[conf_overlay].parent, STAGE);

set(layer[conf_overlay].url,'/xplorit_common/frameworks/xplorit/plugins/xplorit_whiteboard.min.js');
if(layer[conf_overlay],
trace('xplorit_conference POST CHECK - PASSED!');
,
trace('xplorit_conference POST CHECK - FAILED!');
);

</action>

ATTENDEE 1.20
VM24:1 INFO: join_conf()
VM24:1 INFO: load_xplorit_conference()
VM24:1 INFO: xplorit_conference PRE CHECK - PASSED!
VM24:1 INFO: xplorit_conference POST CHECK - PASSED!
VM24:1 INFO: conf_overlay PRE CHECK - PASSED!
VM24:1 INFO: xplorit_conference POST CHECK - PASSED!
VM67:53 --- PRIMARY | resetMap()
VM68:56 --- PRIMARY | xplorit_conference.registerplugin myScreenName = Phreddy
VM68:56 ------ SECONDARY | Adding confidiv to the DOM
VM68:62 <div id=​"confdiv" style=​"width:​ 100%;​ height:​ 400px;​ overflow:​ hidden;​ position:​ absolute;​ bottom:​ 0px;​ display:​ flex;​ flex-direction:​ column;​ justify-content:​ flex-end;​ pointer-events:​ none;​">​</div>​flex
VM68:56 --- PRIMARY | preview.xplorit.local
VM68:56 ------ SECONDARY | CONFDIV EXISTS ONLOAD
VM68:56 ------ SECONDARY | load_scripts(/node_modules/socket.io/client-dist/socket.io.js,/node_modules/agora-rtc-sdk-ng-latest/AgoraRTC_N-production.js, async function xa(){d("newstart()");va();wa()})
VM68:56 --- PRIMARY | resolve_url_path(/node_modules/socket.io/client-dist/socket.io.js)
VM24:1 INFO: conf_nav_open()
VM68:56 ------ SECONDARY | load_scripts(/node_modules/agora-rtc-sdk-ng-latest/AgoraRTC_N-production.js, async function xa(){d("newstart()");va();wa()})
VM68:56 --- PRIMARY | resolve_url_path(/node_modules/agora-rtc-sdk-ng-latest/AgoraRTC_N-production.js)
VM68:56 ------ SECONDARY | load_scripts(, async function xa(){d("newstart()");va();wa()})
VM68:56 --- PRIMARY | newstart()
VM68:56 --- PRIMARY | chat_start()
VM68:56 --- PRIMARY | conference_start()
VM68:56 --- PRIMARY | onResize()
VM68:56 --- PRIMARY | join_conf()
VM68:56 --- PRIMARY | socket_connect()
VM68:56 --- PRIMARY | socket_connecting......
VM68:56 --- PRIMARY | join_conf_socket([object Object])
VM68:56 --- PRIMARY | common_conf_elements([object Object])
VM68:56 --- PRIMARY | common_socket([object Object])
VM68:56 --- PRIMARY | show_chat()
VM68:56 ------ SECONDARY | CONFDIV EXISTS SHOWCHAT
VM68:56 ------ SECONDARY | add flex_hide
VM68:56 ------ SECONDARY | socket.id ====== gw9ITndI-qqwP2FsAAAL
VM68:56 --- PRIMARY | newjoin()
VM68:56 ------ SECONDARY | CONFDIV EXISTS NEWJOIN
VM68:56 --- PRIMARY | join_agora()
VM68:56 ------ SECONDARY | CONFDIV EXISTS AGORA

ATTENDEE 1.21
INFO: join_conf()
VM24:3 INFO: load_xplorit_conference()
VM24:3 INFO: xplorit_conference PRE CHECK - PASSED!
VM24:3 INFO: xplorit_conference POST CHECK - PASSED!
VM24:3 INFO: conf_overlay PRE CHECK - PASSED!
VM24:3 INFO: xplorit_conference POST CHECK - PASSED!
VM28:56 --- PRIMARY | xplorit_conference.registerplugin myScreenName = Phreddy
VM28:56 ------ SECONDARY | Adding confidiv to the DOM
VM28:62 <div id=​"confdiv" style=​"width:​ 100%;​ height:​ 400px;​ overflow:​ hidden;​ position:​ absolute;​ bottom:​ 0px;​ display:​ flex;​ flex-direction:​ column;​ justify-content:​ flex-end;​ pointer-events:​ none;​">​</div>​
VM28:56 --- PRIMARY | preview.xplorit.local
VM28:56 ------ SECONDARY | CONFDIV DOES NOT EXISTS ONLOAD
VM28:56 ------ SECONDARY | load_scripts(/node_modules/socket.io/client-dist/socket.io.js,/node_modules/agora-rtc-sdk-ng-latest/AgoraRTC_N-production.js, async function xa(){d("newstart()");va();wa()})
VM28:56 --- PRIMARY | resolve_url_path(/node_modules/socket.io/client-dist/socket.io.js)
VM24:3 INFO: conf_nav_open()
VM28:56 ------ SECONDARY | load_scripts(/node_modules/agora-rtc-sdk-ng-latest/AgoraRTC_N-production.js, async function xa(){d("newstart()");va();wa()})
VM28:56 --- PRIMARY | resolve_url_path(/node_modules/agora-rtc-sdk-ng-latest/AgoraRTC_N-production.js)
VM76:53 --- PRIMARY | resetMap()
VM28:56 ------ SECONDARY | load_scripts(, async function xa(){d("newstart()");va();wa()})
VM28:56 --- PRIMARY | newstart()
VM28:56 --- PRIMARY | chat_start()
VM28:56 --- PRIMARY | conference_start()
VM28:56 --- PRIMARY | onResize()
VM28:56 --- PRIMARY | join_conf()
VM28:56 --- PRIMARY | socket_connect()
VM28:56 --- PRIMARY | socket_connecting......
VM28:56 --- PRIMARY | join_conf_socket([object Object])
VM28:56 --- PRIMARY | common_conf_elements([object Object])
VM28:56 --- PRIMARY | common_socket([object Object])
VM28:56 --- PRIMARY | show_chat()
VM28:56 ------ SECONDARY | CONFDIV DOES NOT EXISTS SHOWCHAT
VM28:56 ------ SECONDARY | add flex_hide
VM28:56 ------ SECONDARY | socket.id ====== yLh_yRepYJjLdmJKAAAP
VM28:56 --- PRIMARY | newjoin()
VM28:56 ------ SECONDARY | CONFDIV DOES NOT EXISTS NEWJOIN
VM28:56 --- PRIMARY | join_agora()
VM28:56 ------ SECONDARY | CONFDIV DOES NOT EXISTS AGORA

This post has been edited 2 times, last edit by "Douglas Rhiner" (Aug 17th 2023, 12:22am)


258

Thursday, August 17th 2023, 10:13am

Hi,

set(layer[xplorit_conference].parent, layer[socket_stage]);
That's the most important part - what's about that socket_stage layer?
Where was it defined and was it already added?

if(layer[xplorit_conference],
Note - teses checks are unnecessary, these are only checking if that object exists...

About 1.20 and 1.21 generally - yes, they can work differently in 'undefined' cases (as the internal layer system is almost completely new), but assuming that e.g. not loaded or not added elements or elements without layout are always already on the DOM is also wrong. E.g. when changing the parent, the changing of the underlying DOM elements will be not done instantly, that will be done in the next 'layout step' because that change can also have an effect on the sizes and positions.

You could try adding a

Source code

1
display.layout.update();
[/url] call to ensure that dynamic layout changes, like the parent change are performed.

See:
https://krpano.com/docu/xml/#display.layout.update

Best regards,
Klaus

Douglas Rhiner

Intermediate

Posts: 141

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

259

Friday, August 18th 2023, 2:16am

Klaus,

First off, thank you for helping me with this.

The layer[socket_stage] is part of the primary XML layout, non-dynamically generated.

<layer name="socket_stage" type="container" style="socket_stage"></layer>

I managed to get the video elements to render for the ATTENDEE by adding in display.layout.update(); ( as you suggested in two places - see code below ) but they are definitely no children of layer[socket_stage] in the ATTENDEE instance.
Here are the Elements gleaned from the Element Inspector in Chrome.
As you can see the HOST layer[socket_stage] definitly is parent to the plugin.

I've included two screen captures of both HOST and ATTENDEE instances.
Once again all of this is pulling from the same code base and using v1.21.

HOST
[img]https://drive.google.com/file/d/18QrEWhvUsGMYCUeADnoQaw5IgroFSldD/view?usp=sharing[/img]

ATTENDEE
[img]https://drive.google.com/file/d/133uMNy3hWX3EaEFpiC0QA0baBN7KIcro/view?usp=sharing[/img]

HOST
<div style="position: absolute; box-sizing: content-box; overflow: visible; opacity: 1; cursor: pointer; pointer-events: auto; background: none; visibility: visible; border-color: rgb(0, 0, 0); border-style: solid; border-width: 0px; border-radius: 0px; z-index: 163; width: 320px; height: 70px; transform: translateZ(0px) translate(717px, 417px) translate(0px, 0px);">
<div style="position: absolute; box-sizing: content-box; overflow: visible; opacity: 1; cursor: pointer; pointer-events: auto; z-index: 118; background: none no-repeat; visibility: visible; width: 320px; height: 70px; transform: translateZ(0px) translate(0px, 0px) translate(0px, 0px);">
<div id="confdiv" style="width: 100%; height: 400px; overflow: hidden; position: absolute; bottom: 0px; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none;">
</div>
</div>
</div>

ATTENDEE
<div style="position: absolute; box-sizing: content-box; overflow: visible; opacity: 1; cursor: pointer; pointer-events: auto; background: none; visibility: visible; border-color: rgb(0, 0, 0); border-style: solid; border-width: 0px; border-radius: 0px; z-index: 161; width: 320px; height: 70px; transform: translateZ(0px) translate(717px, 417px) translate(0px, 0px);"></div>

Action segment with display.layout.update();
addlayer(xplorit_conference);
display.layout.update();
set(layer[xplorit_conference].type, plugin);
set(layer[xplorit_conference].parent, layer[socket_stage]);
display.layout.update();
set(layer[xplorit_conference].with, 100%);
set(layer[xplorit_conference].height, 100%);
set(layer[xplorit_conference].align, leftbottom);
set(layer[xplorit_conference].x, 0);
set(layer[xplorit_conference].y, 0);
set(layer[xplorit_conference].keep, true);
set(layer[xplorit_conference].visible, true);
set(layer[xplorit_conference].alpha, 1.0);
set(layer[xplorit_conference].enabled, true);
set(layer[xplorit_conference].capture, true);
set(layer[xplorit_conference].bgcapture, false);
set(layer[xplorit_conference].zorder, 0);
set(layer[xplorit_conference].room, %1);
set(layer[xplorit_conference].mode, %2);
set(layer[xplorit_conference].url,'/xplorit_common/frameworks/xplorit/plugins/xplorit_conference.min.js');
set(layer[xplorit_conference].onloaded, conf_nav_open());
display.layout.update();

Douglas Rhiner

Intermediate

Posts: 141

Location: San Anselmo, CA

Occupation: Code-Slave

  • Send private message

260

Sunday, September 3rd 2023, 8:40pm

Klaus,

The only way I have managed to get this to work is:

1. When adding the plugin setting the parent with the full-path of of the parent layer and calling display.layout.update(); in the following two positions.
addlayer(xplorit_conference);
display.layout.update();
set(layer[xplorit_conference].type, plugin);
set(layer[xplorit_conference].parent, layer[socket_stage]);
display.layout.update();
...


2. As the very last operation in local.registerplugin we set the parent with the name, not the full-path;
krpano.set("layer[xplorit_conference].parent", "socket_stage");

I traced & logged this out to no end and can't find where the parent-child connection gets lost.
No matter where in my code I get(layer[xplorit_conference].parent), it always comes up layer[socket_stage] although obviously this is not the case.

This post has been edited 1 times, last edit by "Douglas Rhiner" (Sep 4th 2023, 12:17am)


Similar threads