@googleworkspace/meet-addons 1.2.0-dev-856342321 → 1.2.0-dev-856825160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/meet.addons.mjs +2 -2
- package/package.json +1 -1
package/meet.addons.mjs
CHANGED
|
@@ -25,7 +25,7 @@ function Nb(a,b,c,d){let e=!1;d=Kb(a,d,void 0,f=>{const g=tb(f,c,b);e=g!==f&&g!=
|
|
|
25
25
|
function B(a,b,c,d){d=Tb(d);a:{var e=d;Hb(a);const h=a.l;var f=h[l]|0;if(e==null){var g=Rb(h);if(Qb(g,h,f,c)===b)g.set(c,0);else break a}else{g=h;const k=Rb(g),n=Qb(k,g,f,c);n!==b&&(n&&(f=w(g,f,n)),k.set(c,b))}w(h,f,b,e)}d&&!m(d)&&Ib(a.l);return a}
|
|
26
26
|
function Vb(a,b){Hb(a);const c=a.l;let d=c[l]|0;if(b==null)return w(c,d,1),a;let e=b===Ea?7:b[l]|0,f=e;const g=Ob(e),h=g||Object.isFrozen(b);let k=!0,n=!0;for(let z=0;z<b.length;z++){var r=b[z];g||(r=m(r),k&&(k=!r),n&&(n=r))}g||(e=k?13:5,e=n?e&-4097:e|4096);h&&e===f||(b=[...b],f=0,e=Wb(e,d));e!==f&&(b[l]=e);d=w(c,d,1,b);2&e||!(4096&e||16&e)||Ib(c,d);return a}function Wb(a,b){return a=(2&b?a|2:a&-3)&-273}
|
|
27
27
|
function Xb(a){a=v(a,1);a=a==null||typeof a==="boolean"?a:typeof a==="number"?!!a:void 0;return a!=null?a:!1}function Yb(a){a=ma?v(a,1,void 0,sb):sb(v(a,1));return a!=null?a:Jb}function C(a,b){a=v(a,b);a=a==null||typeof a==="string"?a:void 0;return a!=null?a:""}function D(a,b){a=v(a,b);a=a==null?a:db(a)?a|0:void 0;return a!=null?a:0}function E(a,b,c,d){c=x(a,d)===c?c:-1;return Sb(a,b,c)}function Zb(a,b){return y(a,1,b==null?b:jb(b),"0")}
|
|
28
|
-
function F(a,b,c){if(c!=null){if(!db(c))throw ya("enum");c|=0}return y(a,b,c,0)};function $b(){var a=ac||(ac=bc("[1,2,0]"));a=Fb(a);a=Lb(a,4,u("dev-
|
|
28
|
+
function F(a,b,c){if(c!=null){if(!db(c))throw ya("enum");c|=0}return y(a,b,c,0)};function $b(){var a=ac||(ac=bc("[1,2,0]"));a=Fb(a);a=Lb(a,4,u("dev-856825160"));const b=a.l,c=b[l]|0;return m(a,c)?a:Db(a,b,c)?Eb(a,b):new a.constructor(Cb(b,c,!0))}var G=class{constructor(a){this.l=zb(a,void 0,void 0,2048)}toJSON(){return yb(this)}};G.prototype[Da]=Ga;G.prototype.toString=function(){return this.l.toString()};function cc(a){return b=>{if(b==null||b=="")b=new a;else{b=JSON.parse(b);if(!Array.isArray(b))throw Error("dnarr");b[l]|=32;b=new a(b)}return b}};var bc=function(a){return b=>{b=JSON.parse(b);if(!Array.isArray(b)){var c=typeof b;throw Error("Expected jspb data to be an array, got "+(c!="object"?c:b?Array.isArray(b)?"array":c:"null")+": "+b);}b[l]|=34;return new a(b)}}(class extends G{});var dc=class extends G{};function ec(a){var b=new fc(500);let c=0,d;return(...e)=>{hc(b)?a(...e):(d=()=>void a(...e),c||(c=setTimeout(()=>{c=0;let f;(f=d)==null||f()},ic(b))))}}function jc(a){var b=new fc(100),c=Promise.resolve();return(...d)=>hc(b)?a(...d):c};function hc(a){return kc(a,a.index)>=a.g?(a.h[a.index]=Date.now(),a.index=(a.index+1)%1,!0):!1}function ic(a){const b=a.g;a=kc(a,a.index);return a>=b?0:b-a}function kc(a,b){let c;return Date.now()-((c=a.h[b])!=null?c:-1*a.g)}var fc=class{constructor(a){this.g=a;this.h=[];this.index=0}};var lc=class extends G{},mc=[2,3];var nc=class extends G{};var H=class extends Error{constructor({errorType:a,message:b,i:c}){super(`Meet add-on SDK error: ${`${b}${c?` - ${c}`:""}`}`);this.errorType=a}},K={errorType:"InternalError",message:"An unexpected error has occurred.",i:"No further information is available."},oc={errorType:"MissingUrlParameter",message:"Missing required Meet SDK URL parameter",i:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not strip URL parameters (e.g. as part of a redirect)."},
|
|
29
29
|
pc={errorType:"NeedsMainStageContext",message:"This method can only be invoked if the addon is running in the main stage.",i:"Use getFrameType to check whether the addon is running in the main stage before invoking this method."},qc={errorType:"NeedsSidePanelContext",message:"This method can only be invoked if the addon is running in the side panel.",i:"Use getFrameType to check whether the addon is running in the side panel before invoking this method."},rc={errorType:"NotSupportedInStandalone",
|
|
30
30
|
message:"This method is not supported in standalone mode.",i:"Do not call this method in standalone mode."},sc={errorType:"MustBeIframed",message:"The SDK must be run in an iframe as part of a Google Meet add-on.",i:"See https://developers.google.com/meet/add-ons/guides/deploy-add-on to deploy to Meet."},tc={errorType:"InternalError",message:"The frame type URL parameter is set to an unexpected value.",i:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect)."},
|
|
31
31
|
uc={errorType:"InvalidCloudProjectNumber",message:"Cloud Project Number provided by meet does not match the one passed in by the SDK. Ensure that the correct Cloud Project Number is passed to the SDK as a string.",i:"This parameter is automatically appended by Meet to the iframe URL. Ensure that your infrastructure does not modify URL parameters (e.g. as part of a redirect) and ensure that the correct Cloud Project Number was passed into the SDK as a string."},vc={errorType:"DestinationNotReady",
|
|
@@ -71,7 +71,7 @@ function Of({activityTitle:a}){var b=new tf;return Lb(b,4,u(a))}function Pf(a,b)
|
|
|
71
71
|
class Tf{constructor(a,b,c,d){this.m=a;this.h=b;this.config=c;this.u=ec(e=>void this.m.O(e));Vf(this.h,e=>{const f=x(e,bf);switch(f){case 1:Uf(this,E(e,Ze,1,bf));break;case 2:case 0:console.warn(`IllegalMessage: ${f} - ${"Unhandled message"} - ${"Please raise a bug with the MeetJS team"}`)}});this.A=(new Bf({ea:1E3,ia:()=>{var e,f,g=(f=(e=this.m).ka)==null?void 0:f.call(e);if(this.g!==null){this.g={...this.g,...g};e=new yf;f=this.config;g=f.W;var h=new qf;h=Zb(h,this.j);f=g.call(f,h,this.g);e=B(e,
|
|
72
72
|
1,zf,f);this.h.send(e)}}})).start();this.g=null;this.j=0;d&&Uf(this,d)}disconnect(){this.h.shutdown();this.A.shutdown()}notify(a,b,c){var d=c?Of(c):void 0;c=this.config;var e=c.X;var f=new vf;f=Zb(f,this.j);d=Ub(f,4,d);a=e.call(c,d,a);a=this.config.V(a,b);b=this.h;c=b.send;e=new yf;a=B(e,2,zf,a);c.call(b,a)}};var Wf=class{constructor(a){this.g=a}broadcastStateUpdate(a){Y(this.g,()=>({state:a,context:{}}))}disconnect(){this.g.disconnect()}};function Xf(a,b){return a==null||b==null?!1:a.bytes.length===b.bytes.length&&a.bytes.every((c,d)=>c===b.bytes[d])};var Yf=class{constructor(a){this.g=a}notifySwitchedToMedia(a,b,c){Y(this.g,()=>({state:{mediaId:b,mediaPlayoutRate:1,mediaPlayoutPosition:c,playbackState:"PLAY"},ga:{activityTitle:a},context:{B:1}}))}notifyPauseState(a,b){Y(this.g,c=>{if(c==null)throw Error("Invalid before coWatchingState");return{state:{...c,playbackState:a?"PAUSE":"PLAY",mediaPlayoutPosition:b},context:{B:3}}})}notifySeekToTimestamp(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},
|
|
73
73
|
context:{B:2}}})}notifyPlayoutRate(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutRate:a},context:{B:4}}})}notifyBuffering(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a,playbackState:"BUFFERING"},context:{B:3}}})}notifyReady(a){Y(this.g,b=>{if(b==null)throw Error("Invalid before coWatchingState");return{state:{...b,mediaPlayoutPosition:a},context:{B:3}}})}disconnect(){this.g.disconnect()}};
|
|
74
|
-
function Zf(a,b){if(a==null||b==null)return!1;const c=a.playbackState==="PLAY"?3*Math.max(a.mediaPlayoutRate,1):0,d=Math.abs(a.mediaPlayoutPosition-b.mediaPlayoutPosition);return a.mediaId===b.mediaId&&a.mediaPlayoutRate===b.mediaPlayoutRate&&d<=c&&a.playbackState===b.playbackState};function Vf(a,b){sd(a.signal,c=>{b(c)},a.g)}var $f=class{constructor(a,b){this.channel=a;this.signal=b;this.g=new O}send(a){this.channel.send(JSON.stringify(yb(a)))}async D(a,b){a=await this.channel.D(JSON.stringify(yb(a)));return b(a.data)}shutdown(){this.g.dispose()}};function ag(a,b){var c=bg;const d=a.signal(),e=a.signal();sd(b,f=>{const g=c(f)?d:e;Le(a,g,f)},a);return{ja:d,ha:e}}function cg(a,b,c,d=
|
|
74
|
+
function Zf(a,b){if(a==null||b==null)return!1;const c=a.playbackState==="PLAY"?3*Math.max(a.mediaPlayoutRate,1):0,d=Math.abs(a.mediaPlayoutPosition-b.mediaPlayoutPosition);return a.mediaId===b.mediaId&&a.mediaPlayoutRate===b.mediaPlayoutRate&&d<=c&&a.playbackState===b.playbackState};function Vf(a,b){sd(a.signal,c=>{b(c)},a.g)}var $f=class{constructor(a,b){this.channel=a;this.signal=b;this.g=new O}send(a){this.channel.send(JSON.stringify(yb(a)))}async D(a,b){a=await this.channel.D(JSON.stringify(yb(a)));return b(a.data)}shutdown(){this.g.dispose()}};function ag(a,b){var c=bg;const d=a.signal(),e=a.signal();sd(b,f=>{const g=c(f)?d:e;Le(a,g,f)},a);return{ja:d,ha:e}}function cg(a,b,c,d){const e=d!=null?d:f=>f;sd(c,f=>{Le(a,b,e(f))},a)};async function dg(a,b){if(b)return a=await Sf({activityTitle:b.activityTitle,K:"co-watching",ka:()=>b.onCoWatchingStateQuery(),O:c=>{b.onCoWatchingStateChanged(c)}},a,{X:Kf,W:Mf,V:Pf,N:If,M:Zf}),new Yf(a)}async function eg(a,b){if(b)return a=await Sf({activityTitle:b.activityTitle,K:"co-doing",O:c=>{b.onCoDoingStateChanged(c)}},a,{X:Ff,W:Hf,V:Qf,N:Ef,M:Xf}),new Wf(a)}
|
|
75
75
|
async function fg(a){var b=new Oe,c=b.signal();a=await a;cg(b,c,a.signal,f=>f.content);const {ja:d,ha:e}=ag(b,c);b=new $f(a.channel,d);c=new $f(a.channel,e);return{aa:b,ba:c}}function bg(a){a:switch(x(a,bf)){case 1:a=E(a,Ze,1,bf);break a;default:throw Error("CA Message arrived with no known content message set");}return a.h()};async function gg(a,b){({aa:a}=await fg(hf(a.g)));b=await eg(a,b);if(!b)throw Error("Failed to create co-doing session");return b}async function hg(a,b){({ba:a}=await fg(hf(a.g)));b=await dg(a,b);if(!b)throw Error("Failed to create co-watching session");return b};var ig=class extends Ad{async notifySidePanel(a){await lf(this.context.g,1,a)}async unloadSidePanel(){await jf(this.context.g)}async loadSidePanel(){await kf(this.context.g)}};var jg=class extends Ad{async setAddonStartingState(a){if(a===null)throw new H(Cc("addonStartingState"));if(typeof a!=="object")throw new H(L("addonStartingState",typeof a,"object | undefined"));if(a.sidePanelUrl!==void 0&&typeof a.sidePanelUrl!=="string")throw new H(L("sidePanelUrl",typeof a.sidePanelUrl,"string | undefined"));if(a.additionalData!==void 0&&typeof a.additionalData!=="string")throw new H(L("additionalData",typeof a.additionalData,"string | undefined"));if(Object.keys(a).length!==+!!a.sidePanelUrl+
|
|
76
76
|
+!!a.additionalData)throw new H(Bc);if(Object.keys(a).length===0)throw new H(Ac);var b=[];b.push(Yc(Xc(Vc(1),a.sidePanelUrl),a.additionalData));a=this.context.g;var c=new Sd,d=c.setAddonStartingState,e=new Rd;b=Vb(e,b);await mf(a,d.call(c,b))}};var kg=class extends Ad{async notifyMainStage(a){await lf(this.context.g,2,a)}};var lg=class{constructor(a){a=a.cloudProjectNumber;const b=Cd();if(b.cloudProjectNumber!==a)throw new H(uc);const c=b.S,d=b.ca;let e;nf=(e=nf)!=null?e:df(d,c,a);this.g=new of(b)}async createMainStageClient(){var a=this.g;if(a.h.frameType!==2)throw new H(pc);return await Promise.resolve(new ig(a))}async createSidePanelClient(){var a=this.g;if(a.h.frameType!==1)throw new H(qc);return await Promise.resolve(new kg(a))}async createCoWatchingClient(a){return await hg(this.g,a)}async createCoDoingClient(a){return await gg(this.g,
|
|
77
77
|
a)}async createRoomsStandaloneClient(){var a=this.g;if(a.h.frameType!==2)throw new H(pc);return await Promise.resolve(new jg(a))}};let mg=null;for(var ng={addon:{getFrameType:function(){a:{var a=Cd().frameType;switch(a){case 2:a="MAIN_STAGE";break a;case 1:a="SIDE_PANEL";break a;default:throw Error(`Unknown frame type: ${a}`);}}return a},createAddonSession:async function(a){if(a===null)throw new H(Cc("config"));if(typeof a!=="object")throw new H(L("config",typeof a,"object"));if(typeof a.cloudProjectNumber!=="string")throw new H(L("cloudProjectNumber",typeof a.cloudProjectNumber,"string"));if(mg&&Cd().S!=="integration.test.google.com")throw new H(Lc);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@googleworkspace/meet-addons",
|
|
3
3
|
"description": "The Google Meet add-ons SDK lets you embed your app into Google Meet as an add-on where users can discover, share, and collaborate in the app without leaving Meet",
|
|
4
|
-
"version": "1.2.0-dev-
|
|
4
|
+
"version": "1.2.0-dev-856825160",
|
|
5
5
|
"repository": "googleworkspace/meet",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://developers.google.com/meet/add-ons/guides/overview",
|