Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

di0deman

Anfänger

Beiträge: 12

Wohnort: Republic of Korea

  • Nachricht senden

241

Mittwoch, 14. Juni 2023, 03:17

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.

Quellcode

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.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »di0deman« (27. August 2023, 05:03)


di0deman

Anfänger

Beiträge: 12

Wohnort: Republic of Korea

  • Nachricht senden

242

Mittwoch, 14. Juni 2023, 03:40

The performance of the videoplayer plugin is slow.

Hi Klaus,

The code to test is written as below.

Quellcode

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.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »di0deman« (27. August 2023, 04:58)


243

Mittwoch, 14. Juni 2023, 09:14

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

244

Mittwoch, 14. Juni 2023, 12:39

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).

Quellcode

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:







Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »pano_dave« (14. Juni 2023, 15:34)


245

Donnerstag, 22. Juni 2023, 09:54

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

Fortgeschrittener

Beiträge: 192

Wohnort: Turkey

Beruf: 360 Software and Hardware Developing

  • Nachricht senden

246

Freitag, 23. Juni 2023, 20:01

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 .



Quellcode

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.

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »PanoramicWEB« (23. Juni 2023, 21:24)


247

Samstag, 24. Juni 2023, 16:34

<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*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »worinima2128« (24. Juni 2023, 17:14)


248

Montag, 26. Juni 2023, 05:33

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.

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »MANJAY« (27. Juni 2023, 05:28)


249

Freitag, 30. Juni 2023, 13:02

Can 'mouse_3d_cursor' also work on the mobile end?

Can 'mouse_3d_cursor' also work on the mobile end?

250

Freitag, 21. Juli 2023, 05:15

Tween

is distance func support when tweening multiple variables ?

di0deman

Anfänger

Beiträge: 12

Wohnort: Republic of Korea

  • Nachricht senden

251

Montag, 31. Juli 2023, 03:09

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:

Quellcode

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

Schüler

Beiträge: 68

Wohnort: China

Beruf: Krpano custom coding

  • Nachricht senden

252

Montag, 31. Juli 2023, 17:55

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

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Eric Chen« (1. August 2023, 23:06)


di0deman

Anfänger

Beiträge: 12

Wohnort: Republic of Korea

  • Nachricht senden

253

Mittwoch, 2. August 2023, 10:44

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

Dienstag, 8. August 2023, 19:33

您是否考虑过加载 3dtile

Douglas Rhiner

Fortgeschrittener

Beiträge: 141

Wohnort: San Anselmo, CA

Beruf: Code-Slave

  • Nachricht senden

255

Montag, 14. August 2023, 22:37

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

Dienstag, 15. August 2023, 08:48

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

Fortgeschrittener

Beiträge: 141

Wohnort: San Anselmo, CA

Beruf: Code-Slave

  • Nachricht senden

257

Mittwoch, 16. August 2023, 23:59

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

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Douglas Rhiner« (17. August 2023, 00:22)


258

Donnerstag, 17. August 2023, 10:13

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

Quellcode

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

Fortgeschrittener

Beiträge: 141

Wohnort: San Anselmo, CA

Beruf: Code-Slave

  • Nachricht senden

259

Freitag, 18. August 2023, 02:16

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

Fortgeschrittener

Beiträge: 141

Wohnort: San Anselmo, CA

Beruf: Code-Slave

  • Nachricht senden

260

Sonntag, 3. September 2023, 20:40

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.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Douglas Rhiner« (4. September 2023, 00:17)


Ähnliche Themen