@@ -16,14 +16,14 @@ limitations under the License.
16
16
17
17
import React , { ReactNode } from "react" ;
18
18
import { decode } from "blurhash" ;
19
+ import { MediaEventContent } from "matrix-js-sdk/src/types" ;
19
20
import { logger } from "matrix-js-sdk/src/logger" ;
20
21
21
22
import { _t } from "../../../languageHandler" ;
22
23
import SettingsStore from "../../../settings/SettingsStore" ;
23
24
import InlineSpinner from "../elements/InlineSpinner" ;
24
25
import { mediaFromContent } from "../../../customisations/Media" ;
25
26
import { BLURHASH_FIELD } from "../../../utils/image-media" ;
26
- import { IMediaEventContent } from "../../../customisations/models/IMediaEventContent" ;
27
27
import { IBodyProps } from "./IBodyProps" ;
28
28
import MFileBody from "./MFileBody" ;
29
29
import { ImageSize , suggestedSize as suggestedVideoSize } from "../../../settings/enums/ImageSize" ;
@@ -62,7 +62,7 @@ export default class MVideoBody extends React.PureComponent<IBodyProps, IState>
62
62
}
63
63
64
64
private getContentUrl ( ) : string | undefined {
65
- const content = this . props . mxEvent . getContent < IMediaEventContent > ( ) ;
65
+ const content = this . props . mxEvent . getContent < MediaEventContent > ( ) ;
66
66
// During export, the content url will point to the MSC, which will later point to a local url
67
67
if ( this . props . forExport ) return content . file ?. url ?? content . url ;
68
68
const media = mediaFromContent ( content ) ;
@@ -82,7 +82,7 @@ export default class MVideoBody extends React.PureComponent<IBodyProps, IState>
82
82
// there's no need of thumbnail when the content is local
83
83
if ( this . props . forExport ) return null ;
84
84
85
- const content = this . props . mxEvent . getContent < IMediaEventContent > ( ) ;
85
+ const content = this . props . mxEvent . getContent < MediaEventContent > ( ) ;
86
86
const media = mediaFromContent ( content ) ;
87
87
88
88
if ( media . isEncrypted && this . state . decryptedThumbnailUrl ) {
@@ -121,7 +121,7 @@ export default class MVideoBody extends React.PureComponent<IBodyProps, IState>
121
121
posterLoading : true ,
122
122
} ) ;
123
123
124
- const content = this . props . mxEvent . getContent < IMediaEventContent > ( ) ;
124
+ const content = this . props . mxEvent . getContent < MediaEventContent > ( ) ;
125
125
const media = mediaFromContent ( content ) ;
126
126
if ( media . hasThumbnail ) {
127
127
const image = new Image ( ) ;
@@ -157,7 +157,7 @@ export default class MVideoBody extends React.PureComponent<IBodyProps, IState>
157
157
this . props . onHeightChanged ?.( ) ;
158
158
} else {
159
159
logger . log ( "NOT preloading video" ) ;
160
- const content = this . props . mxEvent . getContent < IMediaEventContent > ( ) ;
160
+ const content = this . props . mxEvent . getContent < MediaEventContent > ( ) ;
161
161
162
162
let mimetype = content ?. info ?. mimetype ;
163
163
0 commit comments