All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix safe area issue when enter web fullscreen #1033
- Refactor
ParceltoVite - Change
Artplayer.FULLSCREEN_WEB_IN_BODYdefaults totrue - The
resetmethod is used to reset video request - Fix #1014
- Fix #1023
- Fix #1028
- Add
artplayer-plugin-jassubplugin - Add
artplayer-proxy-mediabunnyplugin - Add
artplayer-plugin-audio-trackplugin - Add
artplayer-plugin-asrplugin - Add
artplayer-plugin-danmuku-maskplugin - Deprecate
artplayer-plugin-libassplugin - Prevent
Hint.cssfrom polluting global styles
- Rename
.esm.jsto.mjs - Remove the default
fillcolor value ofsvg - Optimize the
autoOrientationlogic - Add
Artplayer.REMOVE_SRC_WHEN_DESTROY - Add
artplayer-plugin-document-pipplugin - Add
art.events.bindGlobalEventsmethod for rebinding global methods - Optimize
artplayer.d.ts, now you can directly importOption
import type { Option } from 'artplayer'
const option: Option = {
container: '.artplayer-app',
url: './assets/sample/video.mp4',
}- Simplify
i18nimport
import fr from 'artplayer/i18n/fr'
import id from 'artplayer/i18n/id'
const option = {
container: '.artplayer-app',
url: './assets/sample/video.mp4',
i18n: { id, fr },
lang: 'fr',
}- Add
ESMversion for all packages, such asartplayer/dist/artplayer.esm.js - Recognize
globalThis.CUSTOM_USER_AGENTglobal variable for customizingnavigator.userAgent - Fix missing
mountparameter when initializingartplayer-plugin-danmuku
- Add Vietnamese
vi - Clear the
video.srcproperty on destroy - Add
onClickoption forSetting - Fix style loading failure of danmuku and chapter plugins when the page has no head tag
- Add
gestureoption to enable or disable gesture events on mobilevideoelement
- Fix thumbnail crossover issue
- Fix style loading failure when the page has no head tag
- Add slider support in subtitle plugin settings panel for mobile dragging
- Fix positioning error of settings panel when rotating screen
- Fix classname switching error when fullscreen state changes
- Refactor
Settingcomponent, fix state loss issue - For
Settingof typerange, callback now returns an array of numbers instead of a single number - Remove
isStringOrNumberutility function - Fix inconsistent state issue in
artplayer-plugin-hls-control - Deprecate
artplayer-plugin-dash-qualityplugin - Add new
artplayer-plugin-dash-controlplugin - Use
codeinstead of deprecatedkeyCodefor keyboard events - Add
keydownevent to listen forkeydownfromdocument
- Add
option.proxyfor proxying third-partyvideoandcanvas - Add
artplayer-proxy-canvasproxy, enabling video playback viacanvas - Add
option.thumbnails.scalefor preview image scaling - Fix bug where changing
art.urldidn’t triggerautoPlayback: #797 - Add
art.subtitle.cuesproperty for retrieving all subtitle list - Add
art.subtitle.activeCuesproperty for retrieving active subtitles - Add
subtitleBeforeUpdateevent triggered before subtitle element rendering - Change
subtitleUpdateevent tosubtitleAfterUpdate, triggered after subtitle element rendering - Optimize trigger timing and callback parameters of
subtitleLoadevent - Remove
subtitleSwitchevent; usesubtitleLoadinstead - Upgrade
artplayer-plugin-hls-qualitytoartplayer-plugin-hls-control - Add
artplayer-plugin-ambilightplugin - Fix
thumbnailsdisplay bug
- Add
Artplayer.STYLEproperty to return player style text art.screenshot('your-name')now supports custom file names- When
Artplayer.CONTEXTMENUisfalse, default context menu is no longer hidden - Add
art.thumbnailsproperty for dynamically settingthumbnails
- Optimize
setBarevent - Add
artplayerPluginChapterplugin - Add
art.plugins.artplayerPluginDanmuku.load(target)parameter for appending danmuku library - Add
widthoption to danmuku plugin; when player width is smaller than this, danmuku sender is placed at the bottom - Fix
artplayerPluginVttThumbnailnot displaying on mobile - Fix danmuku plugin style and percentage font-size bug
thumbnailsare now visible on mobile too- Restore
screen.orientation.lockfunctionality
- Refactor
artplayerPluginDanmukuplugin - Add
artplayerPluginChromecastplugin - Add
fullscreenErrorevent - Optimize double-click event: #728
- Fix delayed display of
thumbnails - Add
art.plugins.lock.state = true/falsefor manually controllinglockstate - Control bar no longer auto-hides when mouse is on it or when settings panel is open
- Remove
screen.orientation.lockdue to compatibility issues - Fix
fullscreenbug on mobile
- Plugin functions now support both synchronous and asynchronous returns
- Plugin functions now support async return
- Player will no longer be destroyed after reaching error limit for playback address
- Split language files, core no longer bundles multiple languages Language Settings
- Updating components now supports updating only specified fields pull/549
- Add
mutedevent triggered when mute state changes - Add
Artplayer.LOG_VERSIONglobal config to control whether to print player version (defaulttrue) - Add
Artplayer.USE_RAFglobal config to control whether to userequestAnimationFrame(defaultfalse), currently for smooth progress bar effect - Remove default styles
margin:0;padding:0;to avoid conflicts with third-party libraries - Subtitle line changed from
ptodivtag, with classnameart-subtitle-line - On mobile, tapping video toggles control bar display
- Remove
art.loopinterval playback feature (not commonly used) - Subtitle track now has
labelattribute to display subtitle names on mobile - Add utility functions
unescape,isBrowser,setStyleText - Add
artplayerPluginMultipleSubtitlesplugin for merged subtitle files: demo - Modify mini progress bar display
- Fix
art.autoOrientationstyle bug - Remove animation effect of player container
- Fix conflict of
art.mini - Fix animation bug of
art.aspectRatio
- Switching via
switchUrlorswitchQualitypreserves existing adjustments such asaspectRatio,playbackRate,flip,autoSize - Remove the second
nameparameter fromswitchUrlandswitchQuality - Add
isIOS13utility to fix inaccurateisMobiledetection on iOS 13+ art.autoSizeandart.autoHeightare now methods:art.autoSize()andart.autoHeight()- Add new property
art.qualityfor dynamically updating quality list - Fix incorrect
art.aspectRatioproperty - Add
art.switchsetter property, same asart.switchUrlmethod
- Fix style bug of settings panel
- Add
heatmapoption to danmuku plugin for enabling heatmap (default: off) - Fix English subtitle line break style bug
- Fix settings panel style bug
- Remove unnecessary global properties
- Remove
titleoption (not useful now) - Remove
whitelistoption (not useful now)
- Fix controller dropdown list style bug
- Fix
event.pageYvalue error in volume controller - Update build config,
artplayer.legacy.jsnow compatible with IE 11
- Fix style compatibility issue of control bar position
- Fix web fullscreen style bug
- Fix built-in settings text error
- Rewrite volume controller
- Fix incorrect progress drag angle on mobile
- Rewrite
minimode, now video detaches from original container - All components (layers, controller, contextmenu, settings panel) support dynamic deletion and updating
- Subtitle option adds
onVttLoadfor modifying vtt text before output - Rewrite all styles, add many
cssvariables - Add
cssVaroption for initializingcssvariables - Add
cssVarmethod for getting/settingcssvariables artplayer-plugin-hls-qualityaddsgetResolutionfunction option for getting resolution text from level- Add
artplayer-plugin-dash-qualityplugin for adding Dash quality list to player - Fix
lockandloopevent issues - Add Russian
ruand Indonesianidlanguages - Update
artplayer-plugin-controlforartplayer@5.0.0 - Update
artplayer-plugin-dash-qualityforartplayer@5.0.0 - Update
artplayer-plugin-hls-qualityforartplayer@5.0.0 - Update
artplayer-plugin-danmukuforartplayer@5.0.0
- Default
Artplayer.PROGRESS_HEIGHTchanged to6 - Add
artplayer-plugin-vtt-thumbnailto generate video preview images from vtt subtitle files - Add
Artplayer.FULLSCREEN_WEB_IN_BODYfor whether to mount player todocument.bodyin web fullscreen (defaultfalse) - Change subtitle offset adjustment to slider
- Subtitle option adds
escape(defaulttrue) for HTML escaping
- Write brand new docs
- Optimize
d.ts - Remove redundant events
- Optimize some styles
- Add
i18noption
- Optimize style effects of control bar icons
- Optimize style effects of settings panel
- Fix incorrect
art.fullscreenstate detection - Add
artplayer-plugin-controlplugin to change control bar style
- Fix
art.loop = []display bug
- Add
Artplayer.CONTEXTMENUfor controlling whether to show contextmenu (defaulttrue) - Whitelist function default
trueon mobile, all devices use player UI
- Fix subtitle not showing in Firefox: #pull/415
- Info popup supports clicking to select video property text
- Add
art.typeproperty to get/set video type - Add
art.videoproperty to get video element - Add
artplayer-tool-iframeplugin to control player inside iframe - Add
artplayer-plugin-hls-qualityplugin for adding Hls quality list - Add
Artplayer.PLAYBACK_RATEfor default playback rates[0.5, 0.75, 1, 1.25, 1.5, 2] - Add
Artplayer.ASPECT_RATIOfor default ratios['default','4:3','16:9'] - Add
Artplayer.FLIPfor default flip options['normal','horizontal','vertical'] - Add
Artplayer.PROGRESS_HEIGHT(default:4) - Add
legacy.jsversion for older browsers (larger size) - Remove
examplesdir, no longer provide Vue/React examples
- Add Farsi language
- Add
Artplayer.DEBUG(defaultfalse) for debug logs - Add
art.setting.update()for dynamic settings update - Optimize
artplayer.d.ts
- Add
Artplayer.VOLUME_STEPfor controlling volume step (default0.1) - Add
Artplayer.SEEK_STEPfor controlling seek step (default5s) - Fix some svg icons not showing on mobile
- Fix desktop progress bar cannot click+drag simultaneously
- Fix mobile progress bar cannot click+drag
- Add
art.isRotateproperty for detecting auto fullscreen rotation - Settings panel
rangeaddsonChangeoption for real-time values
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
settings: [
{
html: 'Slider',
tooltip: '5x',
range: [5, 1, 10, 0.1],
onChange: function (item) {
return item.range + 'x';
},
},
],
});- Fix hls.js not working in Safari
- Ad plugin adds
option.mutedfor autoplay muted ads - Danmuku plugin exposes
art.plugins.artplayerPluginDanmuku.reset()to clear display - Danmuku plugin exposes
art.plugins.artplayerPluginDanmuku.optionfor current config - Fix subtitle bug in iOS fullscreen
- Add Spanish
es
- Add
Artplayer.AUTO_PLAYBACK_MINfor min playback memory value (default5s) - Add
Artplayer.TOUCH_MOVE_RATIOfor mobile progress drag ratio (default0.5) option.thumbnailsadds optionalwidth/height- Add
option.idfor unique playback memory identifier
urloption allows empty string for asyncart.url
const art = new Artplayer({
url: '',
container: '.artplayer-app',
});
setTimeout(() => {
art.url = '/assets/sample/video.mp4';
}, 1000);art.play()always returns Promise;playevent is async
const art = new Artplayer({
url: '/assets/sample/video.mp4',
container: '.artplayer-app',
});
art.on('ready', async () => {
try {
await art.play();
console.log('Play success');
} catch (error) {
console.log('Play failed', error.message);
}
});- Add
airplay(only Safari)
const art = new Artplayer({
url: '/assets/sample/video.mp4',
container: '.artplayer-app',
airplay: true,
});- Optimize auto-playback to allow user choice
- Remove built-in ads
- Add ad plugin
- Support danmuku lib d.ts
- Update deps
- Add danmuku lib d.ts
- Adjust subtitle font-size param
- Optimize regex parsing of xml danmuku
- Fix theme color missing in mini mode
- Fix custom mounted input residual on danmuku destroy
- Fix mini mode size calculation error
- Remove UI init
video:loadedmetadataevent - Danmuku exposes
loadfor switching sources - Add error icon after video load error limit
- Fix multiple init of setting panel bug
- Add
art.isInput, when true control bar won’t auto-hide (e.g. typing danmuku) - Add
art.isLock, when true on mobile prevents seek/play/pause - Fix fixed width bug of danmuku input box
- Settings panel supports
rangeandonRange - Add
isAndroidandisIOSutils - Danmuku adds
lockTime,maxLength,minWidth,maxWidth,mount,beforeEmit,theme
- Settings panel supports
switchandonSwitch - Danmuku plugin adds settings panel and send
- Danmuku adds default mode and font-size
- Danmuku font-size supports percentage of player
- Fix flip icon missing
- Player with focus won’t auto-hide control bar
- Remove subtitle toggle button (manual config required)