Replies: 4 comments
-
If you can compile Ruffle yourself, you might want to see if the commits on #4273 fix it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for passing this along. When I tried to download the latest browser version (Ruffle 0.1.0 nightly 2021-07-18) it still doesn't even load the image so can't even test the MP3 or WAV player functionality. I'm wondering if our server is blocking it(?)
I get this error: ()=>{"use strict";const e={ruffleEnable:!0,ignoreOptout:!1};let t,n,s,a,o;function r(e){return new Promise(((t,n)=>{e((e=>{const s=chrome.runtime.lastError;s?n(s):t(e)}))}))}if("undefined"!=typeof chrome)t={getMessage:e=>chrome.i18n.getMessage(e)},n={local:{get:e=>r((t=>chrome.storage.local.get(e,t))),remove:e=>r((t=>chrome.storage.local.remove(e,t))),set:e=>r((t=>chrome.storage.local.set(e,t)))},sync:{get:e=>r((t=>chrome.storage.sync.get(e,t))),remove:e=>r((t=>chrome.storage.sync.remove(e,t))),set:e=>r((t=>chrome.storage.sync.set(e,t)))},onChanged:{addListener:e=>chrome.storage.onChanged.addListener(e)}},s={reload:e=>r((t=>chrome.tabs.reload(e,void 0,t))),query:e=>r((t=>chrome.tabs.query(e,t))),sendMessage:(e,t,n)=>r((s=>chrome.tabs.sendMessage(e,t,n,s)))},a={onMessage:{addListener:e=>chrome.runtime.onMessage.addListener(e)},getURL:e=>chrome.runtime.getURL(e)},o=()=>r((e=>chrome.tabs.create({url:"/options.html"},e)));else{if("undefined"==typeof browser)throw new Error("Extension API not found.");t={getMessage:e=>browser.i18n.getMessage(e)},n={local:{get:e=>browser.storage.local.get(e),remove:e=>browser.storage.local.remove(e),set:e=>browser.storage.local.set(e)},sync:{get:e=>browser.storage.sync.get(e),remove:e=>browser.storage.sync.remove(e),set:e=>browser.storage.sync.set(e)},onChanged:{addListener:e=>browser.storage.onChanged.addListener(e)}},s={reload:e=>browser.tabs.reload(e),query:e=>browser.tabs.query(e),sendMessage:(e,t,n)=>browser.tabs.sendMessage(e,t,n)},a={onMessage:{addListener:e=>browser.runtime.onMessage.addListener(e)},getURL:e=>browser.runtime.getURL(e)},o=()=>browser.runtime.openOptionsPage()}const i=[],l=Math.floor(1e11*Math.random());var c,u,m,d;c=void 0,u=void 0,d=function*(){const t=yield function(t){return s=this,a=void 0,r=function*(){const s=yield n.sync.get(t);return Object.assign(Object.assign({},e),s)},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{l(r.next(e))}catch(e){t(e)}}function i(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var s;t.done?e(t.value):(s=t.value,s instanceof o?s:new o((function(e){e(s)}))).then(n,i)}l((r=r.apply(s,a||[])).next())}));var s,a,o,r}(["ruffleEnable","ignoreOptout"]),s=function(){if(document.documentElement.hasAttribute("data-ruffle-optout"))return!0;try{if(window.top&&window.top.document&&window.top.document.documentElement&&window.top.document.documentElement.hasAttribute("data-ruffle-optout"))return!0}catch(e){console.warn(`Unable to check top-level optout: ${e.message}`)}return!1}(),o=!("FOO"!==document.createElement("foo").tagName)&&t.ruffleEnable&&!window.RufflePlayer&&(t.ignoreOptout||!s);a.onMessage.addListener(((e,n,a)=>o?(function(e){const t={type:`FROM_RUFFLE${l}`,index:i.length,data:e};return window.postMessage(t,"*"),new Promise(((e,t)=>{i.push({resolve:e,reject:t})}))}(e).then((e=>{a({loaded:!0,tabSettings:t,optout:s,data:e})})),!0):(a({loaded:!1,tabSettings:t,optout:s}),!1))),o&&(function(e){const t=document.createElement("script");t.textContent='(function(){class RuffleMimeType{constructor(a,b,c){this.type=a,this.description=b,this.suffixes=c}}class RuffleMimeTypeArray{constructor(a){this.__mimetypes=[],this.__named_mimetypes={};for(let b of a)this.install(b)}install(a){let b=this.__mimetypes.length;this.__mimetypes.push(a),this.__named_mimetypes[a.type]=a,this[a.type]=a,this[b]=a}item(a){return this.__mimetypes[a]}namedItem(a){return this.__named_mimetypes[a]}get length(){return this.__mimetypes.length}}class RufflePlugin extends RuffleMimeTypeArray{constructor(a,b,c,d){super(d),this.name=a,this.description=b,this.filename=c}install(a){a.enabledPlugin||(a.enabledPlugin=this),super.install(a)}}class RufflePluginArray{constructor(a){this.__plugins=[],this.__named_plugins={};for(let b of a)this.install(b)}install(a){let b=this.__plugins.length;this.__plugins.push(a),this.__named_plugins[a.name]=a,this[a.name]=a,this[b]=a}item(a){return this.__plugins[a]}namedItem(a){return this.__named_plugins[a]}get length(){return this.__plugins.length}}const FLASH_PLUGIN=new RufflePlugin("Shockwave Flash","Shockwave Flash 32.0 r0","ruffle.js",[new RuffleMimeType("application/futuresplash","Shockwave Flash","spl"),new RuffleMimeType("application/x-shockwave-flash","Shockwave Flash","swf"),new RuffleMimeType("application/x-shockwave-flash2-preview","Shockwave Flash","swf"),new RuffleMimeType("application/vnd.adobe.flash-movie","Shockwave Flash","swf")]);function install_plugin(a){navigator.plugins.install||Object.defineProperty(navigator,"plugins",{value:new RufflePluginArray(navigator.plugins),writable:!1}),navigator.plugins.install(a),0<a.length&&!navigator.mimeTypes.install&&Object.defineProperty(navigator,"mimeTypes",{value:new RuffleMimeTypeArray(navigator.mimeTypes),writable:!1});for(var b=0;b<a.length;b+=1)navigator.mimeTypes.install(a[b])}install_plugin(FLASH_PLUGIN);})();',(document.head||document.documentElement).append(t)}(),function(e){const t=document.createElement("script");t.src=e,(document.head||document.documentElement).append(t)}(a.getURL(`dist/ruffle.js?uniqueMessageSuffix=${l}`)),window.addEventListener("message",(e=>{if(e.source!==window)return;const{type:t,index:n,data:s}=e.data;if(t===`TO_RUFFLE${l}`){const e=i[n];e?(i[n]=null,e.resolve(s)):console.warn("No pending request.")}})))},new((m=void 0)||(m=Promise))((function(e,t){function n(e){try{a(d.next(e))}catch(e){t(e)}}function s(e){try{a(d.throw(e))}catch(e){t(e)}}function a(t){var a;t.done?e(t.value):(a=t.value,a instanceof m?a:new m((function(e){e(a)}))).then(n,s)}a((d=d.apply(c,u||[])).next())}))})();
W. Reid Thompson, MD
Pediatric Cardiology
Johns Hopkins Hospital
From: jhwgh1968 ***@***.***>
Sent: Wednesday, July 7, 2021 10:05 PM
To: ruffle-rs/ruffle ***@***.***>
Cc: W. Reid Thompson ***@***.***>; Author ***@***.***>
Subject: Re: [ruffle-rs/ruffle] Problems with MP3 and WAV audio files (#3015)
External Email - Use Caution
If you can compile Ruffle yourself, you might want to see if the commits on #4273<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fruffle-rs%2Fruffle%2Fpull%2F4273&data=04%7C01%7Cthompson%40jhmi.edu%7Cb82ae10bd9174299e62b08d941b4ce1b%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637613067091440243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=l45HfiKg9Xyf8Nhhvzw6XNq%2BonUZPv3s2Onk%2B0z0iEE%3D&reserved=0> fix it.
-
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fruffle-rs%2Fruffle%2Fdiscussions%2F3015%23discussioncomment-977268&data=04%7C01%7Cthompson%40jhmi.edu%7Cb82ae10bd9174299e62b08d941b4ce1b%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637613067091440243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=swGHKPwjOrmYUFLoXQI0EgrSso20U20dSQ2y3v5tN%2B4%3D&reserved=0>, or unsubscribe<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASVT6ZC53BHGUHQTOQGCNOLTWUBVBANCNFSM4W4AC6TQ&data=04%7C01%7Cthompson%40jhmi.edu%7Cb82ae10bd9174299e62b08d941b4ce1b%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637613067091450189%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7DIsAcKViqcLUUg1WvLRy3dFhI2EFuOWRFQDUmmJNNE%3D&reserved=0>.
|
Beta Was this translation helpful? Give feedback.
-
I’d say that the right sample rate for the WAV file should be 44100Hz (https://www.adobe.com/content/dam/acom/en/devnet/pdf/swf-file-format-spec.pdf#search=44100). But how about a new issue attaching a minimal sound file for each format? Just in case it might help. |
Beta Was this translation helpful? Give feedback.
-
Support for playing external MP3s was added a long time ago in #6738. I'm not sure if I've ever seen Flash content that loaded external WAV files, though. If anyone can provide an example of this, I would appreciate it! |
Beta Was this translation helpful? Give feedback.
-
I have a teaching website that used flash for playing recorded heart sounds (not embedded in the player) for medical students to learn about auscultation. Ruffle seems great at emulating the player. I first used it in a chrome browser, then was able to incorporate it into my website. Functionality seems perfect for both however the heart sounds are not playing in either one. The wav files are 16-bit little-endian, 65kbps, 4065 Hz, 1 channel and the MP3s are 24kbps, 22050 Hz, 1 channel. I read that there are some problems with audio. Is this something in the pipeline? Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions