Hi
Running OC 4.0.2.3
Looking for an extension that allows me to stream audio from Soundcloud, bu can't find any
Any ideas?
Running OC 4.0.2.3
Looking for an extension that allows me to stream audio from Soundcloud, bu can't find any
Any ideas?
Per
Sampletekk
You don't need an extension. You can simply use the SoundCloud embed code.
Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk
I've tried that and added the code to the products description, (in source mode), but it doesn't work. Just results in a blank area
This is the code I added:
<iframe width="100%" height="450" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=ht ... frame><div style="font-size: 10px; color: #cccccc;line-break: anywhere;word-break: normal;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; font-family: Interstate,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Garuda,Verdana,Tahoma,sans-serif;font-weight: 100;"><a href="https://soundcloud.com/sampletekk-2" title="SampleTekk" target="_blank" style="color: #cccccc; text-decoration: none;">SampleTekk</a> · <a href="https://soundcloud.com/sampletekk-2/sets/7cg-mkii" title="7CG MkII" target="_blank" style="color: #cccccc; text-decoration: none;">7CG MkII</a></div>
Per
Sampletekk
Use your web browser's developer tool to check for any messages and to inspect the page to see if the code you added is there.
It's thereADD Creative wrote: ↑Mon Feb 12, 2024 11:50 pmUse your web browser's developer tool to check for any messages and to inspect the page to see if the code you added is there.
Per
Sampletekk
Make sure there's also a </iframe> at the end of your code. It would also help if you could let us know your website URL.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Sure! It's a weird URL, since it's not yet connected to the domain:
https://8fyire8d.a2hosted.com/index.php ... 42&path=33
Per
Sampletekk
As I said, use your web browser's developer tool to check for any messages. You will find some relating to your iframe.
Your iframes are sandboxed and won't allow scripts. It could be that the sandbox was added by the OpenCart editor. In which case you may be able to change the configuration.
https://ckeditor.com/docs/ckeditor4/lat ... attributes
Or you could change you iframe code.
https://developer.mozilla.org/en-US/doc ... me#sandbox
Code: Select all
Blocked script execution in '...' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
https://ckeditor.com/docs/ckeditor4/lat ... attributes
Or you could change you iframe code.
https://developer.mozilla.org/en-US/doc ... me#sandbox
Well, in the code it says: <p><iframe allow="autoplay" frameborder="no" height="450" sandbox="" scrolling="no"ADD Creative wrote: ↑Tue Feb 13, 2024 5:40 pmAs I said, use your web browser's developer tool to check for any messages. You will find some relating to your iframe.
Your iframes are sandboxed and won't allow scripts. It could be that the sandbox was added by the OpenCart editor. In which case you may be able to change the configuration.Code: Select all
Blocked script execution in '...' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
https://ckeditor.com/docs/ckeditor4/lat ... attributes
Or you could change you iframe code.
https://developer.mozilla.org/en-US/doc ... me#sandbox
Should that be altered?
Per
Sampletekk
You may be able to change the sandbox to sandbox="allow-scripts".
If that doesn't work you may have to add the following to admin/view/javascript/ckeditor/config.js.
If that doesn't work you may have to add the following to admin/view/javascript/ckeditor/config.js.
Code: Select all
config.iframe_attributes = {
sandbox: 'allow-scripts'
}
Updated the config.js and added this code to the products description, generated from Soundcloud:ADD Creative wrote: ↑Wed Feb 14, 2024 7:16 pmYou may be able to change the sandbox to sandbox="allow-scripts".
If that doesn't work you may have to add the following to admin/view/javascript/ckeditor/config.js.
Code: Select all
config.iframe_attributes = { sandbox: 'allow-scripts' }
Code: Select all
<p><iframe allow="autoplay" frameborder="no" height="166" sandbox="allow-scripts" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/218732849&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true" width="100%"></iframe></p>
<div style="font-size: 10px; color: #cccccc;line-break: anywhere;word-break: normal;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; font-family: Interstate,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Garuda,Verdana,Tahoma,sans-serif;font-weight: 100;"><a href="https://soundcloud.com/sampletekk-2" style="color: #cccccc; text-decoration: none;" target="_blank" title="SampleTekk">SampleTekk</a> · <a href="https://soundcloud.com/sampletekk-2/7cg-mkii-demo2" style="color: #cccccc; text-decoration: none;" target="_blank" title="7CG MkII Demo2">7CG MkII Demo2</a></div>
Productpage: https://8fyire8d.a2hosted.com/index.php ... 42&path=33
Per
Sampletekk
Check your web browser's developer tool. You may see a message like the following.
In which case you also need to add allow-same-origin to the config.Uncaught DOMException: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.
Can't find anything like thatADD Creative wrote: ↑Thu Feb 15, 2024 6:57 pmCheck your web browser's developer tool. You may see a message like the following.In which case you also need to add allow-same-origin to the config.Uncaught DOMException: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.
Per
Sampletekk
In Chrome go to the web developer tools, by pressing F12 or 'Developer tools' under 'More tools' in the menu. Other web browsers may have a different method for the developer tool. In the developer tool look under 'Console', where you can see messages and error about your site.
Just checked your link and I see that error in the console.
Just checked your link and I see that error in the console.
Found it! Didn't know where to look! So, should this be added to the config file?ADD Creative wrote: ↑Thu Feb 15, 2024 10:29 pmIn Chrome go to the web developer tools, by pressing F12 or 'Developer tools' under 'More tools' in the menu. Other web browsers may have a different method for the developer tool. In the developer tool look under 'Console', where you can see messages and error about your site.
Just checked your link and I see that error in the console.
config.iframe_attributes = {
sandbox: ' allow-same-origin'
}
Per
Sampletekk
I think you will need both and maybe others once you have tested that.
Code: Select all
config.iframe_attributes = {
sandbox: 'allow-scripts allow-same-origin'
}
No commas or other characters between the statements? 'allow-scripts allow-same-origin'ADD Creative wrote: ↑Fri Feb 16, 2024 12:15 amI think you will need both and maybe others once you have tested that.
Code: Select all
config.iframe_attributes = { sandbox: 'allow-scripts allow-same-origin' }
Per
Sampletekk
They are space separated. See the example at the link I posted.
https://ckeditor.com/docs/ckeditor4/lat ... attributes
https://ckeditor.com/docs/ckeditor4/lat ... attributes
First, thank you for trying to help me out here!ADD Creative wrote: ↑Fri Feb 16, 2024 7:42 amThey are space separated. See the example at the link I posted.
https://ckeditor.com/docs/ckeditor4/lat ... attributes
I've updated the config.js file with this:
config.iframe_attributes = {
sandbox: 'allow-scripts allow-same-origin'
}
But I still can't see any playable soundcloud files, and still have this error:
widget-9-1061b89d17d1.js:32 Uncaught DOMException: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.
Per
Sampletekk
Check your change saved and refresh all caches. If you view your page source your sandbox only has allow-scripts and not allow-same-origin. You could also try adding allow-same-origin to your iframe code.
Who is online
Users browsing this forum: No registered users and 3 guests