mulmocast-viewer 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +1 -1
- package/README.md +1 -1
- package/dist/mulmocast-viewer.css +1 -1
- package/dist/mulmocast-viewer.es.js +130 -111
- package/dist/mulmocast-viewer.umd.js +1 -1
- package/package.json +3 -1
package/README.ja.md
CHANGED
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ You can customize navigation buttons and layout using slots.
|
|
|
64
64
|
← Previous
|
|
65
65
|
</button>
|
|
66
66
|
|
|
67
|
-
<MulmoPlayer v-bind="pageProps" />
|
|
67
|
+
<component :is="MulmoPlayer" v-bind="pageProps" />
|
|
68
68
|
|
|
69
69
|
<button @click="pageMove(1)" :disabled="currentPage >= pageCount - 1">
|
|
70
70
|
Next →
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.bottom-2{bottom:calc(var(--spacing)*2)}.left-1\/2{left:50%}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-6\!{height:calc(var(--spacing)*6)!important}.h-auto{height:auto}.max-h-\[80vh\]{max-height:80vh}.max-h-full{max-height:100%}.w-4{width:calc(var(--spacing)*4)}.w-30{width:calc(var(--spacing)*30)}.w-auto{width:auto}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-full{max-width:100%}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.resize{resize:both}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-gray-500{background-color:var(--color-gray-500)}.object-contain{object-fit:contain}.p-2{padding:calc(var(--spacing)*2)}.p-10{padding:calc(var(--spacing)*10)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.text-center{text-align:center}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-white{color:var(--color-white)}.opacity-0\!{opacity:0!important}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.hover\:bg-black\/80:hover{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/80:hover{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.hover\:bg-gray-600:hover{background-color:var(--color-gray-600)}}.disabled\:opacity-50:disabled{opacity:.5}}.mulmocast-video::-webkit-media-controls-enclosure{background-color:#00000080!important;border-radius:0!important}.mulmocast-video::-webkit-media-controls-current-time-display{-webkit-text-fill-color:#fff!important}.mulmocast-video::-webkit-media-controls-time-remaining-display{-webkit-text-fill-color:#fff!important}.mulmocast-video::-webkit-media-controls-play-button{filter:brightness(1.1)}.mulmocast-video::-webkit-media-controls-mute-button{filter:brightness(1.1)}.mulmocast-video::-webkit-media-controls-overlay-play-button{filter:brightness(1.1)}.mulmocast-video::-webkit-media-controls-fullscreen-button{filter:brightness(1.1)}.mulmocast-video::-webkit-media-controls{opacity:0;transition:opacity .3s}.mulmocast-video:hover::-webkit-media-controls{opacity:1}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
|
|
1
|
+
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-xl:80rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-bold:700;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.right-0{right:calc(var(--spacing)*0)}.right-8{right:calc(var(--spacing)*8)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-8{bottom:calc(var(--spacing)*8)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.z-50{z-index:50}.mx-auto{margin-inline:auto}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-6\!{height:calc(var(--spacing)*6)!important}.h-auto{height:auto}.max-h-\[80vh\]{max-height:80vh}.max-h-full{max-height:100%}.w-4{width:calc(var(--spacing)*4)}.w-30{width:calc(var(--spacing)*30)}.w-auto{width:auto}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-full{max-width:100%}.max-w-screen-xl{max-width:var(--breakpoint-xl)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.bg-black{background-color:var(--color-black)}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-indigo-600{background-color:var(--color-indigo-600)}.object-contain{object-fit:contain}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-10{padding:calc(var(--spacing)*10)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.text-center{text-align:center}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-800{color:var(--color-gray-800)}.text-white{color:var(--color-white)}.opacity-0\!{opacity:0!important}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.hover\:bg-black\/80:hover{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/80:hover{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.hover\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}}.mulmocast-video::-webkit-media-controls-enclosure{background-color:#00000080!important;border-radius:0!important}.mulmocast-video::-webkit-media-controls-current-time-display{-webkit-text-fill-color:#fff!important}.mulmocast-video::-webkit-media-controls-time-remaining-display{-webkit-text-fill-color:#fff!important}.mulmocast-video::-webkit-media-controls-play-button{filter:brightness(1.1)}.mulmocast-video::-webkit-media-controls-mute-button{filter:brightness(1.1)}.mulmocast-video::-webkit-media-controls-overlay-play-button{filter:brightness(1.1)}.mulmocast-video::-webkit-media-controls-fullscreen-button{filter:brightness(1.1)}.mulmocast-video::-webkit-media-controls{opacity:0;transition:opacity .3s}.mulmocast-video:hover::-webkit-media-controls{opacity:1}.mulmocast-audio::-webkit-media-controls-enclosure{background-color:#00000080!important;border-radius:0!important}.mulmocast-audio::-webkit-media-controls-current-time-display{-webkit-text-fill-color:#fff!important}.mulmocast-audio::-webkit-media-controls-time-remaining-display{-webkit-text-fill-color:#fff!important}.mulmocast-audio::-webkit-media-controls-play-button{filter:brightness(1.1)}.mulmocast-audio::-webkit-media-controls-mute-button{filter:brightness(1.1)}.mulmocast-audio::-webkit-media-controls{opacity:0;transition:opacity .3s}.mulmocast-audio:hover::-webkit-media-controls{opacity:1}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as $, ref as m, createElementBlock as i, openBlock as u, createTextVNode as H, createElementVNode as d, createCommentVNode as R, toDisplayString as C, Fragment as N, renderList as I, computed as x, renderSlot as O, withDirectives as q, normalizeProps as W, guardReactiveProps as G, createVNode as J, mergeProps as j, unref as K, createBlock as Q, vShow as U } from "vue";
|
|
2
|
+
const B = async (t) => await new Promise((S) => setTimeout(S, t)), X = { class: "items-center justify-center w-full" }, Y = { key: 0 }, Z = ["src"], ee = {
|
|
3
3
|
key: 1,
|
|
4
4
|
class: "relative inline-block"
|
|
5
|
-
},
|
|
5
|
+
}, ae = ["src"], te = ["src"], oe = {
|
|
6
|
+
key: 2,
|
|
7
|
+
class: "relative inline-block"
|
|
8
|
+
}, ue = ["src"], ne = ["src"], ie = {
|
|
6
9
|
key: 3,
|
|
7
10
|
class: "relative inline-block"
|
|
8
|
-
},
|
|
11
|
+
}, le = ["src"], se = { key: 4 }, ce = "https://github.com/receptron/mulmocast-cli/blob/main/assets/images/mulmocast_credit.png?raw=true", L = /* @__PURE__ */ $({
|
|
9
12
|
__name: "mulmo_player",
|
|
10
13
|
props: {
|
|
11
14
|
index: {},
|
|
@@ -18,42 +21,42 @@ const N = async (t) => await new Promise((S) => setTimeout(S, t)), U = { class:
|
|
|
18
21
|
duration: {}
|
|
19
22
|
},
|
|
20
23
|
emits: ["play", "pause", "ended"],
|
|
21
|
-
setup(t, { expose: S, emit:
|
|
22
|
-
const
|
|
23
|
-
o.value && a.value && (o.value.currentTime = a.value.currentTime, o.value.currentTime === a.value.currentTime && o.value.play()),
|
|
24
|
-
},
|
|
25
|
-
!a.value?.ended && o?.value && o.value?.pause(), console.log(v),
|
|
24
|
+
setup(t, { expose: S, emit: _ }) {
|
|
25
|
+
const n = t, c = _, l = m(), a = m(), o = m(), g = m(), f = m(), p = () => {
|
|
26
|
+
o.value && a.value && (o.value.currentTime = a.value.currentTime, o.value.currentTime === a.value.currentTime && o.value.play()), c("play");
|
|
27
|
+
}, k = (v) => {
|
|
28
|
+
!a.value?.ended && o?.value && o.value?.pause(), console.log(v), b(v);
|
|
26
29
|
}, w = () => {
|
|
27
|
-
!o.value?.paused && !o.value?.ended && (o.value?.currentTime ?? 0) > 0 ||
|
|
30
|
+
!o.value?.paused && !o.value?.ended && (o.value?.currentTime ?? 0) > 0 || P();
|
|
28
31
|
}, r = () => {
|
|
29
|
-
!a.value?.paused && !a.value?.ended && (a.value?.currentTime ?? 0) > 0 ||
|
|
32
|
+
!a.value?.paused && !a.value?.ended && (a.value?.currentTime ?? 0) > 0 || P();
|
|
30
33
|
}, h = () => {
|
|
31
|
-
|
|
32
|
-
},
|
|
34
|
+
c("play");
|
|
35
|
+
}, b = (v) => {
|
|
33
36
|
const y = v.target;
|
|
34
|
-
y.duration !== y.currentTime &&
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
+
y.duration !== y.currentTime && c("pause");
|
|
38
|
+
}, P = () => {
|
|
39
|
+
c("ended");
|
|
37
40
|
};
|
|
38
41
|
return S({
|
|
39
42
|
play: async () => {
|
|
40
|
-
|
|
43
|
+
l.value && l.value.play(), a.value && a.value.play(), g.value && g.value.play(), !l.value && !a.value && !g.value && (await B((n.duration ?? 0) * 1e3), c("ended"));
|
|
41
44
|
}
|
|
42
|
-
}), (v, y) => (
|
|
43
|
-
t.videoWithAudioSource ? (
|
|
44
|
-
|
|
45
|
+
}), (v, y) => (u(), i("div", X, [
|
|
46
|
+
t.videoWithAudioSource ? (u(), i("div", Y, [
|
|
47
|
+
d("video", {
|
|
45
48
|
ref_key: "videoWithAudioRef",
|
|
46
|
-
ref:
|
|
49
|
+
ref: l,
|
|
47
50
|
src: t.videoWithAudioSource,
|
|
48
51
|
class: "mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",
|
|
49
52
|
controls: !0,
|
|
50
53
|
playsinline: "true",
|
|
51
54
|
onPlay: h,
|
|
52
|
-
onPause:
|
|
53
|
-
onEnded:
|
|
54
|
-
}, null, 40,
|
|
55
|
-
])) : t.soundEffectSource || t.videoSource ? (
|
|
56
|
-
|
|
55
|
+
onPause: b,
|
|
56
|
+
onEnded: P
|
|
57
|
+
}, null, 40, Z)
|
|
58
|
+
])) : t.soundEffectSource || t.videoSource ? (u(), i("div", ee, [
|
|
59
|
+
d("video", {
|
|
57
60
|
ref_key: "videoRef",
|
|
58
61
|
ref: a,
|
|
59
62
|
class: "mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",
|
|
@@ -61,10 +64,10 @@ const N = async (t) => await new Promise((S) => setTimeout(S, t)), U = { class:
|
|
|
61
64
|
controls: !0,
|
|
62
65
|
playsinline: "true",
|
|
63
66
|
onPlay: p,
|
|
64
|
-
onPause:
|
|
67
|
+
onPause: k,
|
|
65
68
|
onEnded: w
|
|
66
|
-
}, null, 40,
|
|
67
|
-
t.audioSource ? (
|
|
69
|
+
}, null, 40, ae),
|
|
70
|
+
t.audioSource ? (u(), i("audio", {
|
|
68
71
|
key: 0,
|
|
69
72
|
ref_key: "audioSyncRef",
|
|
70
73
|
ref: o,
|
|
@@ -72,53 +75,62 @@ const N = async (t) => await new Promise((S) => setTimeout(S, t)), U = { class:
|
|
|
72
75
|
controls: !0,
|
|
73
76
|
class: "hidden",
|
|
74
77
|
onEnded: r
|
|
75
|
-
}, null, 40,
|
|
76
|
-
])) : t.audioSource ? (
|
|
77
|
-
|
|
78
|
+
}, null, 40, te)) : R("", !0)
|
|
79
|
+
])) : t.audioSource ? (u(), i("div", oe, [
|
|
80
|
+
t.imageSource ? (u(), i("img", {
|
|
81
|
+
key: 0,
|
|
82
|
+
src: t.imageSource,
|
|
83
|
+
class: "mx-auto h-auto max-h-[80vh] w-auto object-contain",
|
|
84
|
+
alt: "Background"
|
|
85
|
+
}, null, 8, ue)) : (u(), i("img", {
|
|
86
|
+
key: 1,
|
|
87
|
+
src: ce,
|
|
88
|
+
class: "mx-auto h-auto max-h-[80vh] w-auto object-contain",
|
|
89
|
+
alt: "Background"
|
|
90
|
+
})),
|
|
91
|
+
d("audio", {
|
|
78
92
|
ref_key: "audioRef",
|
|
79
|
-
ref:
|
|
80
|
-
class: "mulmocast-
|
|
93
|
+
ref: g,
|
|
94
|
+
class: "mulmocast-audio absolute bottom-0 left-0 right-0 w-full",
|
|
81
95
|
src: t.audioSource,
|
|
82
|
-
poster: t.imageSource ?? le,
|
|
83
96
|
controls: !0,
|
|
84
|
-
playsinline: "true",
|
|
85
97
|
onPlay: h,
|
|
86
|
-
onPause:
|
|
87
|
-
onEnded:
|
|
88
|
-
}, null, 40,
|
|
89
|
-
])) : t.imageSource ? (
|
|
90
|
-
|
|
98
|
+
onPause: b,
|
|
99
|
+
onEnded: P
|
|
100
|
+
}, null, 40, ne)
|
|
101
|
+
])) : t.imageSource ? (u(), i("div", ie, [
|
|
102
|
+
d("img", {
|
|
91
103
|
ref_key: "imageRef",
|
|
92
|
-
ref:
|
|
104
|
+
ref: f,
|
|
93
105
|
src: t.imageSource,
|
|
94
106
|
class: "max-w-full max-h-full object-contain"
|
|
95
|
-
}, null, 8,
|
|
96
|
-
])) : (
|
|
97
|
-
|
|
107
|
+
}, null, 8, le)
|
|
108
|
+
])) : (u(), i("div", se, "No media available")),
|
|
109
|
+
H(" " + C(t.text), 1)
|
|
98
110
|
]));
|
|
99
111
|
}
|
|
100
|
-
}),
|
|
112
|
+
}), de = ["value"], re = ["value"], ve = /* @__PURE__ */ $({
|
|
101
113
|
__name: "select_language",
|
|
102
114
|
props: {
|
|
103
115
|
modelValue: {}
|
|
104
116
|
},
|
|
105
117
|
emits: ["update:modelValue"],
|
|
106
118
|
setup(t, { emit: S }) {
|
|
107
|
-
const
|
|
108
|
-
const a =
|
|
109
|
-
|
|
119
|
+
const _ = ["en", "ja"], n = S, c = (l) => {
|
|
120
|
+
const a = l.target;
|
|
121
|
+
n("update:modelValue", a.value);
|
|
110
122
|
};
|
|
111
|
-
return (
|
|
123
|
+
return (l, a) => (u(), i("select", {
|
|
112
124
|
value: t.modelValue,
|
|
113
|
-
onChange:
|
|
125
|
+
onChange: c
|
|
114
126
|
}, [
|
|
115
|
-
(
|
|
127
|
+
(u(), i(N, null, I(_, (o) => d("option", {
|
|
116
128
|
key: o,
|
|
117
129
|
value: o
|
|
118
|
-
},
|
|
119
|
-
], 40,
|
|
130
|
+
}, C(o), 9, re)), 64))
|
|
131
|
+
], 40, de));
|
|
120
132
|
}
|
|
121
|
-
}),
|
|
133
|
+
}), me = { class: "w-full overflow-hidden" }, ge = { class: "max-w-7xl mx-auto px-4" }, fe = { class: "flex items-center justify-between" }, he = ["disabled"], ye = { class: "px-4" }, Se = ["disabled"], Pe = ["src"], pe = /* @__PURE__ */ $({
|
|
122
134
|
__name: "mulmo_viewer",
|
|
123
135
|
props: {
|
|
124
136
|
dataSet: {},
|
|
@@ -128,105 +140,112 @@ const N = async (t) => await new Promise((S) => setTimeout(S, t)), U = { class:
|
|
|
128
140
|
textLang: { default: "en" }
|
|
129
141
|
},
|
|
130
142
|
emits: ["updatedPage", "update:audioLang", "update:textLang"],
|
|
131
|
-
setup(t, { expose: S, emit:
|
|
132
|
-
const
|
|
133
|
-
get: () =>
|
|
134
|
-
set: (e) =>
|
|
135
|
-
}),
|
|
136
|
-
get: () =>
|
|
137
|
-
set: (e) =>
|
|
138
|
-
}), w =
|
|
139
|
-
h.value = !0,
|
|
140
|
-
},
|
|
141
|
-
console.log("pause"), h.value = !1,
|
|
143
|
+
setup(t, { expose: S, emit: _ }) {
|
|
144
|
+
const n = t, c = _, l = n.dataSet?.beats?.length ?? 0, a = m(n.initPage ?? 0), o = m(!0), g = m(), f = m(), p = x({
|
|
145
|
+
get: () => n.audioLang,
|
|
146
|
+
set: (e) => c("update:audioLang", e || "en")
|
|
147
|
+
}), k = x({
|
|
148
|
+
get: () => n.textLang,
|
|
149
|
+
set: (e) => c("update:textLang", e || "en")
|
|
150
|
+
}), w = x(() => n.dataSet?.beats[a.value]), r = (e) => e ? n.basePath + "/" + e : "", h = m(!1), b = () => {
|
|
151
|
+
h.value = !0, f.value && f.value.play();
|
|
152
|
+
}, P = () => {
|
|
153
|
+
console.log("pause"), h.value = !1, f.value && f.value.pause();
|
|
142
154
|
}, E = async () => {
|
|
143
|
-
await
|
|
155
|
+
await B(500), g.value && g.value.play();
|
|
144
156
|
}, v = (e) => {
|
|
145
157
|
a.value !== e && (a.value = e, h.value && o.value && E());
|
|
146
158
|
}, y = (e) => {
|
|
147
|
-
const
|
|
148
|
-
return
|
|
149
|
-
},
|
|
150
|
-
console.log("end"),
|
|
151
|
-
},
|
|
152
|
-
|
|
159
|
+
const s = a.value + e;
|
|
160
|
+
return s > -1 && s < l ? (v(s), c("updatedPage", s), !0) : !1;
|
|
161
|
+
}, V = () => {
|
|
162
|
+
console.log("end"), o.value && y(1) ? E() : (h.value = !1, f.value && f.value.pause());
|
|
163
|
+
}, D = {
|
|
164
|
+
onPlay: b,
|
|
165
|
+
onPause: P,
|
|
166
|
+
onEnded: V
|
|
167
|
+
}, A = x(() => {
|
|
168
|
+
const e = w.value, s = e?.audioSources?.[p.value];
|
|
153
169
|
return {
|
|
154
170
|
videoWithAudioSource: r(e?.videoWithAudioSource),
|
|
155
171
|
videoSource: r(e?.videoSource),
|
|
156
172
|
soundEffectSource: r(e?.soundEffectSource),
|
|
157
|
-
audioSource:
|
|
173
|
+
audioSource: s ? n.basePath + "/" + s : "",
|
|
158
174
|
imageSource: r(e?.imageSource),
|
|
159
175
|
index: a.value,
|
|
160
|
-
text: e?.multiLinguals?.[
|
|
176
|
+
text: e?.multiLinguals?.[k.value] ?? e?.text ?? "",
|
|
161
177
|
duration: e?.duration,
|
|
162
|
-
|
|
163
|
-
onPause: x,
|
|
164
|
-
onEnded: D
|
|
178
|
+
...D
|
|
165
179
|
};
|
|
166
|
-
}), F =
|
|
167
|
-
if (a.value + 1 >=
|
|
180
|
+
}), F = x(() => n.dataSet?.beats[a.value + 1]), T = x(() => {
|
|
181
|
+
if (a.value + 1 >= l) return null;
|
|
168
182
|
const e = F.value;
|
|
169
183
|
return {
|
|
170
184
|
videoWithAudioSource: r(e?.videoWithAudioSource),
|
|
171
185
|
videoSource: r(e?.videoSource),
|
|
172
186
|
soundEffectSource: r(e?.soundEffectSource),
|
|
173
|
-
audioSource: e?.audioSources?.[p.value] ?
|
|
187
|
+
audioSource: e?.audioSources?.[p.value] ? n.basePath + "/" + e.audioSources[p.value] : "",
|
|
174
188
|
imageSource: r(e?.imageSource),
|
|
175
189
|
index: a.value + 1,
|
|
176
|
-
text: e?.multiLinguals?.[
|
|
190
|
+
text: e?.multiLinguals?.[k.value] ?? e?.text ?? "",
|
|
177
191
|
duration: e?.duration
|
|
178
192
|
};
|
|
179
|
-
}), M =
|
|
193
|
+
}), M = x(() => ({
|
|
180
194
|
MulmoPlayer: L,
|
|
181
|
-
pageProps:
|
|
195
|
+
pageProps: A.value,
|
|
182
196
|
currentPage: a.value,
|
|
183
|
-
pageCount:
|
|
197
|
+
pageCount: l,
|
|
184
198
|
pageMove: y,
|
|
185
199
|
isPlaying: h.value,
|
|
186
200
|
audioLang: p,
|
|
187
|
-
textLang:
|
|
188
|
-
SelectLanguage:
|
|
201
|
+
textLang: k,
|
|
202
|
+
SelectLanguage: ve,
|
|
203
|
+
mediaPlayerRef: g,
|
|
204
|
+
// Event handlers for direct access
|
|
205
|
+
handlePlay: b,
|
|
206
|
+
handlePause: P,
|
|
207
|
+
handleEnded: V
|
|
189
208
|
}));
|
|
190
209
|
return S({
|
|
191
210
|
updatePage: v
|
|
192
|
-
}), (e,
|
|
193
|
-
O(e.$slots, "default",
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
211
|
+
}), (e, s) => (u(), i(N, null, [
|
|
212
|
+
O(e.$slots, "default", W(G(M.value)), () => [
|
|
213
|
+
d("div", me, [
|
|
214
|
+
d("div", ge, [
|
|
215
|
+
d("div", fe, [
|
|
216
|
+
d("button", {
|
|
198
217
|
class: "px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50",
|
|
199
218
|
disabled: a.value === 0,
|
|
200
|
-
onClick:
|
|
201
|
-
}, " Prev ", 8,
|
|
202
|
-
|
|
203
|
-
|
|
219
|
+
onClick: s[0] || (s[0] = (z) => y(-1))
|
|
220
|
+
}, " Prev ", 8, he),
|
|
221
|
+
d("div", ye, [
|
|
222
|
+
J(L, j({
|
|
204
223
|
ref_key: "mediaPlayer",
|
|
205
|
-
ref:
|
|
206
|
-
},
|
|
224
|
+
ref: g
|
|
225
|
+
}, A.value), null, 16)
|
|
207
226
|
]),
|
|
208
|
-
|
|
227
|
+
d("button", {
|
|
209
228
|
class: "px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50",
|
|
210
|
-
disabled: a.value >=
|
|
211
|
-
onClick:
|
|
212
|
-
}, " Next ", 8,
|
|
229
|
+
disabled: a.value >= K(l) - 1,
|
|
230
|
+
onClick: s[1] || (s[1] = (z) => y(1))
|
|
231
|
+
}, " Next ", 8, Se)
|
|
213
232
|
])
|
|
214
233
|
])
|
|
215
234
|
])
|
|
216
235
|
]),
|
|
217
|
-
|
|
218
|
-
[
|
|
219
|
-
]) :
|
|
220
|
-
t.dataSet?.bgmFile ? (
|
|
236
|
+
T.value ? q((u(), Q(L, W(j({ key: 0 }, T.value)), null, 16)), [
|
|
237
|
+
[U, !1]
|
|
238
|
+
]) : R("", !0),
|
|
239
|
+
t.dataSet?.bgmFile ? (u(), i("audio", {
|
|
221
240
|
key: 1,
|
|
222
241
|
ref_key: "bgmRef",
|
|
223
|
-
ref:
|
|
242
|
+
ref: f,
|
|
224
243
|
src: t.dataSet?.bgmFile
|
|
225
|
-
}, null, 8,
|
|
244
|
+
}, null, 8, Pe)) : R("", !0)
|
|
226
245
|
], 64));
|
|
227
246
|
}
|
|
228
247
|
});
|
|
229
248
|
export {
|
|
230
|
-
|
|
231
|
-
|
|
249
|
+
pe as MulmoViewer,
|
|
250
|
+
ve as SelectLanguage
|
|
232
251
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.MulmoCastViewer={},f.Vue))})(this,(function(f,e){"use strict";const _=async a=>await new Promise(y=>setTimeout(y,a)),L={class:"items-center justify-center w-full"},R={key:0},$=["src"],C={key:1,class:"relative inline-block"},T=["src"],A=["src"],j={key:2,class:"relative inline-block"},W=["src"],D=["src"],M={key:3,class:"relative inline-block"},F=["src"],z={key:4},O="https://github.com/receptron/mulmocast-cli/blob/main/assets/images/mulmocast_credit.png?raw=true",x=e.defineComponent({__name:"mulmo_player",props:{index:{},videoWithAudioSource:{},soundEffectSource:{},videoSource:{},imageSource:{},audioSource:{},text:{},duration:{}},emits:["play","pause","ended"],setup(a,{expose:y,emit:k}){const l=a,d=k,c=e.ref(),o=e.ref(),n=e.ref(),r=e.ref(),m=e.ref(),S=()=>{n.value&&o.value&&(n.value.currentTime=o.value.currentTime,n.value.currentTime===o.value.currentTime&&n.value.play()),d("play")},v=u=>{!o.value?.ended&&n?.value&&n.value?.pause(),console.log(u),P(u)},b=()=>{!n.value?.paused&&!n.value?.ended&&(n.value?.currentTime??0)>0||p()},s=()=>{!o.value?.paused&&!o.value?.ended&&(o.value?.currentTime??0)>0||p()},g=()=>{d("play")},P=u=>{const h=u.target;h.duration!==h.currentTime&&d("pause")},p=()=>{d("ended")};return y({play:async()=>{c.value&&c.value.play(),o.value&&o.value.play(),r.value&&r.value.play(),!c.value&&!o.value&&!r.value&&(await _((l.duration??0)*1e3),d("ended"))}}),(u,h)=>(e.openBlock(),e.createElementBlock("div",L,[a.videoWithAudioSource?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("video",{ref_key:"videoWithAudioRef",ref:c,src:a.videoWithAudioSource,class:"mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",controls:!0,playsinline:"true",onPlay:g,onPause:P,onEnded:p},null,40,$)])):a.soundEffectSource||a.videoSource?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("video",{ref_key:"videoRef",ref:o,class:"mulmocast-video mx-auto h-auto max-h-[80vh] w-auto object-contain",src:a.soundEffectSource||a.videoSource,controls:!0,playsinline:"true",onPlay:S,onPause:v,onEnded:b},null,40,T),a.audioSource?(e.openBlock(),e.createElementBlock("audio",{key:0,ref_key:"audioSyncRef",ref:n,src:a.audioSource,controls:!0,class:"hidden",onEnded:s},null,40,A)):e.createCommentVNode("",!0)])):a.audioSource?(e.openBlock(),e.createElementBlock("div",j,[a.imageSource?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.imageSource,class:"mx-auto h-auto max-h-[80vh] w-auto object-contain",alt:"Background"},null,8,W)):(e.openBlock(),e.createElementBlock("img",{key:1,src:O,class:"mx-auto h-auto max-h-[80vh] w-auto object-contain",alt:"Background"})),e.createElementVNode("audio",{ref_key:"audioRef",ref:r,class:"mulmocast-audio absolute bottom-0 left-0 right-0 w-full",src:a.audioSource,controls:!0,onPlay:g,onPause:P,onEnded:p},null,40,D)])):a.imageSource?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("img",{ref_key:"imageRef",ref:m,src:a.imageSource,class:"max-w-full max-h-full object-contain"},null,8,F)])):(e.openBlock(),e.createElementBlock("div",z,"No media available")),e.createTextVNode(" "+e.toDisplayString(a.text),1)]))}}),q=["value"],H=["value"],B=e.defineComponent({__name:"select_language",props:{modelValue:{}},emits:["update:modelValue"],setup(a,{emit:y}){const k=["en","ja"],l=y,d=c=>{const o=c.target;l("update:modelValue",o.value)};return(c,o)=>(e.openBlock(),e.createElementBlock("select",{value:a.modelValue,onChange:d},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(k,n=>e.createElementVNode("option",{key:n,value:n},e.toDisplayString(n),9,H)),64))],40,q))}}),I={class:"w-full overflow-hidden"},G={class:"max-w-7xl mx-auto px-4"},J={class:"flex items-center justify-between"},K=["disabled"],Q={class:"px-4"},U=["disabled"],X=["src"],Y=e.defineComponent({__name:"mulmo_viewer",props:{dataSet:{},basePath:{},initPage:{},audioLang:{default:"en"},textLang:{default:"en"}},emits:["updatedPage","update:audioLang","update:textLang"],setup(a,{expose:y,emit:k}){const l=a,d=k,c=l.dataSet?.beats?.length??0,o=e.ref(l.initPage??0),n=e.ref(!0),r=e.ref(),m=e.ref(),S=e.computed({get:()=>l.audioLang,set:t=>d("update:audioLang",t||"en")}),v=e.computed({get:()=>l.textLang,set:t=>d("update:textLang",t||"en")}),b=e.computed(()=>l.dataSet?.beats[o.value]),s=t=>t?l.basePath+"/"+t:"",g=e.ref(!1),P=()=>{g.value=!0,m.value&&m.value.play()},p=()=>{console.log("pause"),g.value=!1,m.value&&m.value.pause()},E=async()=>{await _(500),r.value&&r.value.play()},u=t=>{o.value!==t&&(o.value=t,g.value&&n.value&&E())},h=t=>{const i=o.value+t;return i>-1&&i<c?(u(i),d("updatedPage",i),!0):!1},V=()=>{console.log("end"),n.value&&h(1)?E():(g.value=!1,m.value&&m.value.pause())},Z={onPlay:P,onPause:p,onEnded:V},w=e.computed(()=>{const t=b.value,i=t?.audioSources?.[S.value];return{videoWithAudioSource:s(t?.videoWithAudioSource),videoSource:s(t?.videoSource),soundEffectSource:s(t?.soundEffectSource),audioSource:i?l.basePath+"/"+i:"",imageSource:s(t?.imageSource),index:o.value,text:t?.multiLinguals?.[v.value]??t?.text??"",duration:t?.duration,...Z}}),ee=e.computed(()=>l.dataSet?.beats[o.value+1]),N=e.computed(()=>{if(o.value+1>=c)return null;const t=ee.value;return{videoWithAudioSource:s(t?.videoWithAudioSource),videoSource:s(t?.videoSource),soundEffectSource:s(t?.soundEffectSource),audioSource:t?.audioSources?.[S.value]?l.basePath+"/"+t.audioSources[S.value]:"",imageSource:s(t?.imageSource),index:o.value+1,text:t?.multiLinguals?.[v.value]??t?.text??"",duration:t?.duration}}),te=e.computed(()=>({MulmoPlayer:x,pageProps:w.value,currentPage:o.value,pageCount:c,pageMove:h,isPlaying:g.value,audioLang:S,textLang:v,SelectLanguage:B,mediaPlayerRef:r,handlePlay:P,handlePause:p,handleEnded:V}));return y({updatePage:u}),(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(te.value)),()=>[e.createElementVNode("div",I,[e.createElementVNode("div",G,[e.createElementVNode("div",J,[e.createElementVNode("button",{class:"px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50",disabled:o.value===0,onClick:i[0]||(i[0]=oe=>h(-1))}," Prev ",8,K),e.createElementVNode("div",Q,[e.createVNode(x,e.mergeProps({ref_key:"mediaPlayer",ref:r},w.value),null,16)]),e.createElementVNode("button",{class:"px-4 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 disabled:opacity-50",disabled:o.value>=e.unref(c)-1,onClick:i[1]||(i[1]=oe=>h(1))}," Next ",8,U)])])])]),N.value?e.withDirectives((e.openBlock(),e.createBlock(x,e.normalizeProps(e.mergeProps({key:0},N.value)),null,16)),[[e.vShow,!1]]):e.createCommentVNode("",!0),a.dataSet?.bgmFile?(e.openBlock(),e.createElementBlock("audio",{key:1,ref_key:"bgmRef",ref:m,src:a.dataSet?.bgmFile},null,8,X)):e.createCommentVNode("",!0)],64))}});f.MulmoViewer=Y,f.SelectLanguage=B,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast-viewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/mulmocast-viewer.umd.js",
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
"format": "prettier --write \"src/**/*.{ts,vue,css,html,json}\"",
|
|
32
32
|
"format:check": "prettier --check \"src/**/*.{ts,vue,css,html,json}\""
|
|
33
33
|
},
|
|
34
|
+
"repository": "git+ssh://git@github.com/receptron/mulmocast-viewer.git",
|
|
35
|
+
"author": "receptron",
|
|
34
36
|
"dependencies": {
|
|
35
37
|
"vue": "^3.5.22",
|
|
36
38
|
"vue-i18n": "^11.1.12",
|