File tree Expand file tree Collapse file tree
src/_shared/frametrail-core/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,21 @@ class StorageAdapterDownload extends StorageAdapter {
8888 hvData . config . theme = fullConfig . defaultTheme ;
8989 }
9090
91+ // Ensure clips have inline src so the standalone HTML doesn't depend on a resources index
92+ var HypervideoModel = this . _frameTrailInstance . module ( 'HypervideoModel' ) ;
93+ if ( hvData . clips && HypervideoModel ) {
94+ for ( var c = 0 ; c < hvData . clips . length ; c ++ ) {
95+ if ( ! hvData . clips [ c ] . src && hvData . clips [ c ] . resourceId != null ) {
96+ var res = Database . resources [ hvData . clips [ c ] . resourceId ] ;
97+ if ( res ) {
98+ hvData . clips [ c ] . src = res . src ;
99+ } else if ( HypervideoModel . sourcePath ) {
100+ hvData . clips [ c ] . src = HypervideoModel . sourcePath ;
101+ }
102+ }
103+ }
104+ }
105+
91106 var annotations = Database . getAnnotationsW3C ( ) ;
92107 var contentItem = { hypervideo : hvData } ;
93108 if ( annotations . length > 0 ) {
You can’t perform that action at this time.
0 commit comments