Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
3602b95
Bump tar-fs from 3.0.9 to 3.1.1
dependabot[bot] Sep 24, 2025
1b510fc
Merge pull request #686 from ableplayer/dependabot/npm_and_yarn/tar-f…
joedolson Sep 26, 2025
45a54b1
Merge pull request #687 from ableplayer/develop
joedolson Sep 26, 2025
562b6b5
Merge pull request #688 from ableplayer/develop
joedolson Sep 28, 2025
2cb553f
#692 Parse timestamp tags in WebVTT
richard-smith-preservica Oct 16, 2025
48a8655
Setting max-width does not set width; need video to default to 100%
joedolson Oct 24, 2025
37b976b
Merge pull request #693 from richard-smith-preservica/timestamp-tags-…
joedolson Dec 20, 2025
1e8cb26
Hide transcript & description preferences if player does not have those
joedolson Dec 20, 2025
ca9dec7
Remove console.log
joedolson Dec 20, 2025
8db667f
Prevent descriptions from firing when media not playing
joedolson Dec 20, 2025
4f11091
Avoid repainting icons when unchanged
joedolson Dec 27, 2025
c3cd4b8
Add a new method to fetch translations, with support for fallback.
joedolson Dec 28, 2025
a29b72d
Apply big play on background and background color.
joedolson Dec 28, 2025
78948a2
Make Cookie.js an optional dependency, and use localStorage by default
joedolson Dec 28, 2025
1d14cbf
Remove screen reader only text from buttons
joedolson Dec 28, 2025
4be3ec9
Big play button shouldn't have border radius
joedolson Dec 28, 2025
a917047
Add mechanism to view translations in demos
joedolson Dec 28, 2025
3c2cac4
Remove JS sizing to define player width and height
joedolson Dec 28, 2025
33758cf
Make player type aria-label a translatable string
joedolson Dec 28, 2025
2586e95
Add support for an audio poster image.
joedolson Dec 28, 2025
e082170
Add poster image demo to index
joedolson Dec 28, 2025
fb48cbd
Invite people to contribute financially to Able Player
joedolson Dec 28, 2025
bbf5c65
Add support link to docs header.
joedolson Dec 28, 2025
c94be4a
Update funding info to be current.
joedolson Dec 28, 2025
1dc4515
Move API docs to a notes file in docs instead of JS files.
joedolson Dec 28, 2025
3437d38
Add docs about array elements in geticons
joedolson Dec 28, 2025
5f7b138
Add support for a fixed location for sign language video
joedolson Dec 28, 2025
dd8689d
Update package-lock.json
joedolson Dec 28, 2025
f63c909
Adjust caption styling to center.
joedolson Dec 28, 2025
b2582e2
Rename vars to reflect that they may not be cookies
joedolson Dec 29, 2025
a693ef9
More cookie var renaming
joedolson Dec 29, 2025
9e30126
Improve draggable window positioning
joedolson Dec 29, 2025
596c617
Replace $.ajax with fetch in tracks
joedolson Dec 29, 2025
0a2011c
Begin process of removing jQuery by supporting jQuery slim
joedolson Dec 29, 2025
fd00c08
Update fadeout/in to use CSS transitions
joedolson Dec 29, 2025
8e46268
Update comments to reflect change
joedolson Dec 29, 2025
ffef8fa
Change translations to fetch async await
joedolson Dec 29, 2025
eb816bb
Show needs to happen before hide, not simultaneous.
joedolson Dec 29, 2025
493c21f
Swap jQuery deferred to custom prototype
joedolson Dec 30, 2025
1678dd6
Update docs to reflect changed dependency & update demos to use the s…
joedolson Dec 30, 2025
2b33a4c
Missed file save in deferred changes
joedolson Dec 30, 2025
4d4f887
Eliminate some unused code
joedolson Dec 30, 2025
ac831d7
Merge pull request #709 from ableplayer/jquery-slim
joedolson Dec 30, 2025
fa3ae30
Replace jQuery getScript
joedolson Dec 30, 2025
4d3fd84
On Safari, YouTube automatic posters don't show. This is a known Safa…
joedolson Dec 30, 2025
b92a105
Merge pull request #711 from ableplayer/jquery-slim
joedolson Dec 30, 2025
9cee3c8
Remove some additional unused variables.
joedolson Dec 30, 2025
360b5eb
Merge branch 'develop' of https://github.com/ableplayer/ableplayer in…
joedolson Dec 30, 2025
61c9277
Function doesn't use the YouTube ID argument.
joedolson Dec 30, 2025
7c95772
Remove hide callbacks & change draggable to be a more explicit region.
joedolson Dec 30, 2025
d75d394
Design adjustments to resize and drag handles
joedolson Dec 30, 2025
35f3dd8
Unused var
joedolson Dec 30, 2025
f366acf
Set transcript language order; design adjustments.
joedolson Dec 30, 2025
8b6bcaa
Invalid value passed to getYouTubePosterUrl
joedolson Dec 31, 2025
edda545
All YouTube videos have 640, not all have hd.
joedolson Dec 31, 2025
661ccfb
Assign poster as background to bigplaybutton
joedolson Dec 31, 2025
b2641d2
Remove code that enables poster with YouTube player
joedolson Dec 31, 2025
0214f1f
Remove unused variable, minor changes to comments
joedolson Dec 31, 2025
4127407
Remove setFullscreen(false) when rebuilding player
joedolson Dec 31, 2025
c7c6d7f
Remove references to the helpDialog, which hasn't existed for at leas…
joedolson Dec 31, 2025
3847046
Add preference enabling users to disable custom keyboard shortcuts
joedolson Dec 31, 2025
de99c87
Set border-box sizing on chapters buttons
joedolson Dec 31, 2025
5157e44
Add setTimeout to resolve promise if no captions found.
joedolson Dec 31, 2025
3b5ef73
Simplify AccessibleDialog, remove fullscreen polyfill
joedolson Dec 31, 2025
cb17466
Adjust and restore sign and transcript windows for fullscreen
joedolson Dec 31, 2025
733e64f
Remove right margin on checkbox label in draggables
joedolson Jan 1, 2026
d6dc0c3
Update VTT parsing to handle cues as individual inputs.
joedolson Jan 9, 2026
7228330
Remove debugging
joedolson Jan 9, 2026
c71301c
Ensure that positioning $window doesn't happen if it isn't present.
joedolson Jan 9, 2026
31a2e37
Bump VTS notice to 10 seconds.
joedolson Jan 9, 2026
0d2cc31
Tweaks to VTS alert styles
joedolson Jan 10, 2026
fe8d4a8
Fix todo comment text
joedolson Jan 10, 2026
359ba86
Enhance translations by supporting variables in translated strings
joedolson Jan 10, 2026
efe82f5
Localize VTS
joedolson Jan 10, 2026
b54a833
Accidentally removed entire tr.
joedolson Jan 10, 2026
f77d5ee
Pass data.text where trackText used to be.
joedolson Jan 10, 2026
4849653
Update comment
joedolson Jan 10, 2026
8b37b9f
Add VTS translations to language files.
joedolson Jan 10, 2026
bee61bb
Some comment improvements
joedolson Jan 10, 2026
ebc1f30
Merge pull request #712 from ableplayer/develop
joedolson Jan 10, 2026
e6d24bd
Update video5.html
joedolson Jan 10, 2026
21cc20d
Styling fixes for search2
joedolson Jan 10, 2026
1d813f5
Text fix now that YouTube is supported without captions
joedolson Jan 10, 2026
39e9367
Commit build files
joedolson Jan 10, 2026
811f573
Merge pull request #716 from ableplayer/develop
joedolson Jan 10, 2026
a04fe82
Update changelog.md
joedolson Jan 10, 2026
802287a
Merge pull request #717 from ableplayer/develop
joedolson Jan 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify AccessibleDialog, remove fullscreen polyfill
Removes five arguments from the AccessibleDialog: dialogRole (all Able Player dialogs have the dialog role), isModal (all Able Player's dialogs are modal), $descDiv, unused; width; replaced with CSS; escapeHook - only used by fullscreen, which is already know from the 'fullscreen' arg.

This allows width to be fully controlled in CSS; also changes default width to `fit-content`.

Also removes the polyfill of fullscreen mode. This was only used by iOS, but it really hasn't worked in years. Better to remove it than to have a broken feature.

See #493, #48.
  • Loading branch information
joedolson committed Dec 31, 2025
commit 3b5ef730c42a0e791d739dabad2092d31eb48587
2 changes: 1 addition & 1 deletion scripts/buildplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@
controlLayout[1].push('preferences');
}

if (this.mediaType === 'video' && this.allowFullscreen) {
if (this.mediaType === 'video' && this.allowFullscreen && this.nativeFullscreenSupported() ) {
if (this.skin === 'legacy') {
controlLayout[3].push('fullscreen');
} else {
Expand Down
77 changes: 3 additions & 74 deletions scripts/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -1196,28 +1196,9 @@
this.updatePreferences('prefSign');
};

AblePlayer.prototype.isFullscreen = function () {

// NOTE: This has been largely replaced as of 3.2.5 with a Boolean this.fullscreen,
// which is defined in setFullscreen()
// This function returns true if *any* element is fullscreen
// but doesn't tell us whether a particular element is in fullscreen
// (e.g., if there are multiple players on the page)
// The Boolean this.fullscreen is defined separately for each player instance

if (this.nativeFullscreenSupported()) {
return (document.fullscreenElement ||
document.webkitFullscreenElement ||
document.webkitCurrentFullscreenElement ) ? true : false;
} else {
return this.modalFullscreenActive ? true : false;
}
}

AblePlayer.prototype.setFullscreen = function (fullscreen) {

if (this.fullscreen == fullscreen) {
// replace isFullscreen() with a Boolean. see function for explanation
return;
}
var thisObj = this;
Expand Down Expand Up @@ -1252,61 +1233,9 @@
this.fullscreen = false;
}
} else {
// Non-native fullscreen support through modal dialog.
// Create dialog on first run through.
if (!this.fullscreenDialog) {
var $dialogDiv = $('<div>');
// create a hidden alert, communicated to screen readers via aria-describedby
var $fsDialogAlert = $('<p>',{
'class': 'able-screenreader-alert'
}).text( this.translate( 'fullScreen', 'Full screen' ) ); // TODO: Add alert text that is more descriptive
$dialogDiv.append($fsDialogAlert);
// now render this as a dialog
this.fullscreenDialog = new AccessibleDialog(
$dialogDiv,
this.$fullscreenButton,
'dialog',
true,
this.translate( 'fullScreenTitle', 'Full screen video player' ),
$fsDialogAlert,
this.translate( 'exitFullscreen', 'Exit full screen' ),
'100%',
true,
function () {
thisObj.handleFullscreenToggle()
}
);
$('body').append($dialogDiv);
}

// Track whether paused/playing before moving element; moving the element can stop playback.
var wasPaused = this.paused;

if (fullscreen) {
this.modalFullscreenActive = true;
this.fullscreenDialog.show();

// Move player element into fullscreen dialog, then show.
// Put a placeholder element where player was.
this.$modalFullscreenPlaceholder = $('<div class="placeholder">');
this.$modalFullscreenPlaceholder.insertAfter($el);
$el.appendTo(this.fullscreenDialog.modal);

var newHeight = $(window).height() - this.$playerDiv.height();
if (typeof this.$descDiv !== 'undefined' && (!this.$descDiv.is(':hidden')) ) {
newHeight -= this.$descDiv.height();
}
} else {
this.modalFullscreenActive = false;
$el.insertAfter(this.$modalFullscreenPlaceholder);
this.$modalFullscreenPlaceholder.remove();
this.fullscreenDialog.hide();
}

// Resume playback if moving stopped it.
if (!wasPaused && this.paused) {
this.playMedia();
}
// Removed non-native fullscreen mode in 4.8, which only supported iOS.
// Native fullscreen is on iOS 18+ devices behind a feature flag
// The polyfill hasn't worked for years.
}
// add event handlers for changes in fullscreen mode.
// Browsers natively trigger this event with the Escape key,
Expand Down
73 changes: 30 additions & 43 deletions scripts/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,56 @@
var focusableElementsSelector = "a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";

// Based on the incredible accessible modal dialog.
window.AccessibleDialog = function(modalDiv, $returnElement, dialogRole, isModal, title, $descDiv, closeButtonLabel, width, fullscreen, escapeHook) {
window.AccessibleDialog = function( modalDiv, $returnElement, title, closeButtonLabel) {

this.title = title;
this.closeButtonLabel = closeButtonLabel;
this.focusedElementBeforeModal = $returnElement;
this.escapeHook = escapeHook;
this.baseId = $(modalDiv).attr('id') || Math.floor(Math.random() * 1000000000).toString();
var thisObj = this;
var modal = modalDiv;
this.modal = modal;
if ( width ) {
modal.css({
'width': width
});
}

modal.addClass('able-modal-dialog');

if (!fullscreen) {
var closeButton = $('<button>',{
'class': 'modalCloseButton',
'title': thisObj.closeButtonLabel,
'aria-label': thisObj.closeButtonLabel
}).text('×');
closeButton.on( 'keydown', function (e) {
if (e.key === ' ') {
thisObj.hide();
}
}).on( 'click', function () {
var closeButton = $('<button>',{
'class': 'modalCloseButton',
'title': thisObj.closeButtonLabel,
'aria-label': thisObj.closeButtonLabel
}).text('×');
closeButton.on( 'keydown', function (e) {
if (e.key === ' ') {
thisObj.hide();
});
}
}).on( 'click', function () {
thisObj.hide();
});

var titleH1 = $('<h1></h1>');
titleH1.attr('id', 'modalTitle-' + this.baseId);
titleH1.text(title);
this.titleH1 = titleH1;
var titleH1 = $('<h1></h1>');
titleH1.attr('id', 'modalTitle-' + this.baseId);
titleH1.text(title);
this.titleH1 = titleH1;

modal.attr({
'aria-labelledby': 'modalTitle-' + this.baseId,
});
var modalHeader = $( '<div>', {
'class': 'able-modal-header'
});
modalHeader.prepend(titleH1);
modalHeader.prepend(closeButton);
modal.prepend(modalHeader);
}
modal.attr({
'aria-labelledby': 'modalTitle-' + this.baseId,
});
var modalHeader = $( '<div>', {
'class': 'able-modal-header'
});
modalHeader.prepend(titleH1);
modalHeader.prepend(closeButton);
modal.prepend(modalHeader);

modal.attr({
'aria-hidden': 'true',
'role': dialogRole,
'role': 'dialog',
'aria-modal': 'true'
});
if (isModal) {
modal.attr('aria-modal','true');
}

modal.on( 'keydown', function (e) {
if (e.key === 'Escape') {
if (thisObj.escapeHook) {
thisObj.escapeHook(e, this);
} else {
thisObj.hide();
e.preventDefault();
}
thisObj.hide();
e.preventDefault();
} else if (e.key === 'Tab') {
// Manually loop tab navigation inside the modal.
var parts = modal.find('*');
Expand Down
4 changes: 0 additions & 4 deletions scripts/dragdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,8 @@
resizeDialog = new AccessibleDialog(
$resizeForm,
$windowButton,
'dialog',
true,
this.translate( 'windowResizeHeading', 'Resize Window' ),
$resizeWrapper,
this.translate( 'closeButtonLabel', 'Close' ),
'20em'
);
if (which === 'transcript') {
this.transcriptResizeDialog = resizeDialog;
Expand Down
7 changes: 6 additions & 1 deletion scripts/preference.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,12 @@

// $prefsDiv (dialog) must be appended to the BODY!
$('body').append($prefsDiv);
dialog = new AccessibleDialog($prefsDiv, this.$prefsButton, 'dialog', true, formTitle, $prefsIntro, thisObj.tt.closeButtonLabel, false);
dialog = new AccessibleDialog(
$prefsDiv,
this.$prefsButton,
formTitle,
thisObj.tt.closeButtonLabel
);

// Add save and cancel buttons.
$buttonContainer = $( '<div class="able-prefs-buttons"></div>' );
Expand Down
9 changes: 8 additions & 1 deletion styles/ableplayer.css
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,18 @@ div.able-modal-dialog {
color: var(--able-modal-color);
background-color: var(--able-modal-background);
border: var(--able-modal-border);
width: 50rem;
width: fit-content;
max-width: 95%;
padding: 1rem;
box-sizing: border-box;
}

@media screen and ( width < 800px ) {
div.able-modal-dialog {
min-width: 95%;
}
}

body.able-modal-active {
overflow: hidden;
}
Expand Down Expand Up @@ -618,6 +624,7 @@ div.able-modal-overlay {
.able-modal-header {
display: flex;
justify-content: space-between;
gap: 8px;
}

.able-modal-dialog .modalCloseButton {
Expand Down
Loading