Skip to content

Commit

Permalink
Merge pull request #918 from UniversalViewer/feature/bl-may-23
Browse files Browse the repository at this point in the history
Updated AV Component
  • Loading branch information
stephenwf authored May 11, 2023
2 parents 2487594 + 74ec3ee commit 85e1b70
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 14 deletions.
24 changes: 14 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@edsilv/utils": "^1.0.2",
"@google/model-viewer": "^1.9.2",
"@iiif/base-component": "2.0.1",
"@iiif/iiif-av-component": "^1.2.0",
"@iiif/iiif-av-component": "^1.2.1",
"@iiif/iiif-gallery-component": "^1.1.21",
"@iiif/iiif-metadata-component": "^1.1.19",
"@iiif/iiif-tree-component": "^2.0.3",
Expand Down
4 changes: 4 additions & 0 deletions src/UniversalViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export class UniversalViewer extends BaseContentHandler<IUVData> {
this._assignContentHandler(this.options.data);
}

public get() {
return this._assignedContentHandler;
}

public on(name: string, cb: Function, ctx?: any): void {
this._externalEventListeners.push({
name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class AVCenterPanel extends CenterPanel {
(currentTime: number) => {
this._whenMediaReady(() => {
if (this.avcomponent) {
this.avcomponent.setCurrentTime(currentTime);
this.avcomponent.setCurrentTime(currentTime, true);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,21 @@ export class ShareDialogue extends Dialogue {
this.$tabs = $('<div class="tabs"></div>');
this.$content.append(this.$tabs);


this.$shareButton = $(
'<a class="share tab default" tabindex="0">' + this.content.share + "</a>"
);
this.$tabs.append(this.$shareButton);
if (Bools.getBool(this.config.options.shareEnabled, true)) {
this.$tabs.append(this.$shareButton);
}


this.$embedButton = $(
'<a class="embed tab" tabindex="0">' + this.content.embed + "</a>"
);
this.$tabs.append(this.$embedButton);
if (Bools.getBool(this.config.options.embedEnabled, false)) {
this.$tabs.append(this.$embedButton);
}

this.$tabsContent = $('<div class="tabsContent"></div>');
this.$content.append(this.$tabsContent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,14 @@ export class BaseExtension implements IExtension {
}
return related["@id"];
}

// If there's a `homepage` property in the manifest
const manifest = this.helper.manifest;
const homepage = manifest && manifest.getHomepage();
if (homepage) {
// Use the `homepage` property in the URL box
return homepage;
}
}

return null;
Expand Down

0 comments on commit 85e1b70

Please sign in to comment.