@@ -53,6 +53,7 @@ import {
5353 generateAutoCaptions ,
5454} from './util/muxApi' ;
5555import Sidebar from './locations/Sidebar' ;
56+ import { APP_ORGANIZATION_ID , isMarketplaceVersion } from './util/constants' ;
5657
5758const delay = ( ms : number ) => new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
5859
@@ -104,6 +105,7 @@ export class App extends React.Component<AppProps, AppState> {
104105 muxPlayerRef = React . createRef < any > ( ) ; // eslint-disable-line @typescript-eslint/no-explicit-any
105106 getSignedTokenActionId : string ;
106107 private pollPending = false ;
108+ orgId : string ;
107109
108110 constructor ( props : AppProps ) {
109111 super ( props ) ;
@@ -151,6 +153,10 @@ export class App extends React.Component<AppProps, AppState> {
151153 storyboardToken : undefined ,
152154 raw : undefined ,
153155 } ;
156+
157+ this . orgId = isMarketplaceVersion ( { appId : this . props . sdk . ids . app } )
158+ ? APP_ORGANIZATION_ID
159+ : this . props . sdk . ids . organization ;
154160 }
155161
156162 // eslint-disable-next-line @typescript-eslint/ban-types
@@ -207,7 +213,7 @@ export class App extends React.Component<AppProps, AppState> {
207213
208214 async componentDidMount ( ) {
209215 const appActionsResponse = await this . cmaClient . appAction . getMany ( {
210- organizationId : this . props . sdk . ids . organization ,
216+ organizationId : this . orgId ,
211217 appDefinitionId : this . props . sdk . ids . app ! ,
212218 } ) ;
213219 this . getSignedTokenActionId =
@@ -503,7 +509,7 @@ export class App extends React.Component<AppProps, AppState> {
503509 response : { body } ,
504510 } = await this . cmaClient . appActionCall . createWithResponse (
505511 {
506- organizationId : this . props . sdk . ids . organization ,
512+ organizationId : this . orgId ,
507513 appDefinitionId : this . props . sdk . ids . app ! ,
508514 appActionId : this . getSignedTokenActionId ,
509515 } ,
0 commit comments