Skip to content

Commit

Permalink
ME-6152-type-definitions (#560)
Browse files Browse the repository at this point in the history
* fix: type definitions

* fix: type definitions

* chore: remove jsdocs
  • Loading branch information
tsi authored Feb 22, 2024
1 parent bdc2305 commit ad4e600
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 609 deletions.
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"include": [
"dist/**/*",
"lib/**/*",
"types/**/*"
],
"exclude": [
Expand Down
12 changes: 0 additions & 12 deletions types/video-player-tests.js

This file was deleted.

36 changes: 19 additions & 17 deletions types/video-player-tests.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
/**
* This file is used to validate the type spec. The code is not actually run.
* This file is used to validate the type spec. The code does not actually run.
*/

import VideoPlayer, {Options} from './video-player';
import cloudinary, { videoPlayer, videoPlayerWithProfile, VideoPlayer } from './video-player';

const player: VideoPlayer = new VideoPlayer('player', {}, false);
const player: VideoPlayer = cloudinary.videoPlayer('player', {}, () => {});

player.source('test', {
sourceTypes: ['mp4/h264']
})
sourceTypes: ['mp4/h264']
});
player.play();
player.currentPublicId();
player.pause()
player.pause();

const player2 = new VideoPlayer('player2' , { bigPlayButton: false }, false)
const vPlayer: VideoPlayer = videoPlayer('player', {});

const pl = window.cloudinary.videoPlayer('test',{
cloud_name: 'demo' ,
secure: true ,
bigPlayButton: true,
controls: false
});
vPlayer.source('test');

async () => {
const profilePlayer = await videoPlayerWithProfile('player', {
constrols: false,
fontFace: 'Merienda'
});

interface VideoPlayerWithVideoJs extends VideoPlayer {
videojs: Options;
}
profilePlayer.source({
publicId: 'elephants',
profile: 'default'
});
};
Loading

0 comments on commit ad4e600

Please sign in to comment.