3.0.4 • Published 11 months ago

@filmgardi/phoenix-video-player v3.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

phoenix-video-player

Usage

To include phoenix-video-player on your website or web application, use the following method.

<script src="//path/to/phoenix-video-player.min.js"></script>

The phoenixPlayer function also accepts an options object and a callback to be invoked when the player is ready:

var options = {
	autoplay: false,
	controls: true,
	playbackRates: [0.5, 1, 1.25, 1.5, 3],
	language: 'fa',
	addLanguage: { fa: fa },
	poster: '',
	sources: [],

	info: { title: null, subTitle: null },
	returnUrl: null,
	pluginOptions: {
		seekThumbnailSrc: null,
		seekButtons: {
			forward: 30,
			back: 10,
			forwardIndex: 1,
			backIndex: 1
		},
		nextEpisode: {
			url: '',

			autoAdvance: true,
			showAutoAdvanceButton: true,
			autoAdvanceButtonText: 'قسمت بعدی',
			nextEpisodeDisplayTime: null,
			nextEpisodeDisplayDuration: 10,

			dialogData: {
				title: '',
				description: '',
				url: ``
			},
			dialogTemplate: ({ title, description, url }) => {
				return 'some htmlDom';
			}
			placementIndex: 9,
		},
		skipButton: {
			text: 'skipOpeningCredits',
			from: null,
			to: null,
			position: 'bottom-right',
			offsetH: 46,
			offsetV: 167
		},
		trafficUsage: {
			title: null,
			message: null,
			expireTime: 5, // minute
			position: 'top-right',
			offsetH: 46,
			offsetV: 46
		},
		subtitleSettings: {},
		seasonPlaylist: {
			seasons: null, // array of number
			getEpisode: (season, page, callback) => {
				callback({
					alias: '',
					duration: 0,
					link: '',
					part: 0,
					season: 0,
					thumbnail: '',
					title: null
				});
			}
		},
		vote: {
			submitVote: ({ likeStatus, callback }) => {}, //Tips: likeStatus returns 1 if liked and 2 if disliked
			from: null,
			to: null,
			position: 'bottom-right',
			offsetH: 46,
			offsetV: 167
		},
		collectData: {
			token: ''
		},
		markers: {
			markerTip: {
				display: false,
				skip: true
			},
			onMarkerReached: (marker, index) => {
				console.log(marker, index);
			},
			onMarkerSkipZone: (marker, index) => {
				console.log('onMarkerSkipZone');
			},
			markers: [{ time: null, duration: null }]
		}
	}
	initPlugins: {
	  ...pluginNames
	},
	controlBar: { children: ['componentName'] },
};

var phoenixPlayer = phoenixPlayer('my-player', options, function onPlayerReady() {
  videojs.log('Your player is ready!');

  // In this context, `this` is the player that was created by Video.js.
  this.play();

  // How about an event listener?
  this.on('ended', function() {
    videojs.log('Awww...over so soon?!');
  });
});
3.0.4

11 months ago

3.0.3

1 year ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.9

2 years ago

2.1.16

2 years ago

2.1.17

2 years ago

2.1.14

2 years ago

2.1.12

2 years ago

2.1.13

2 years ago

2.1.10

2 years ago

2.1.11

2 years ago

2.1.8

2 years ago

2.1.7

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.4

2 years ago

1.0.17

3 years ago

1.0.16

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

2.1.2

3 years ago

2.0.15

3 years ago

2.1.1

3 years ago

2.0.16

3 years ago

2.0.13

3 years ago

2.1.3

3 years ago

2.0.14

3 years ago

2.0.11

3 years ago

2.0.12

3 years ago

2.0.10

3 years ago

2.1.0

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.3.0-rc

4 years ago

0.4.1-rc

4 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

0.4.0-rc

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

1.0.11

3 years ago

1.0.10

3 years ago

0.2.2

4 years ago

1.0.13

3 years ago

1.0.12

3 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago