Comments (20)
Hello, on line 14653 is the code for the adUrl embedding. You might be able to put it in there.
search for the code if (typeof _0xc6823.adUrl === 'string') {
To make it to where the user can only click it after the video ends, you can probably edit the setTimeout feature or edit the setTimeout to show the x
button. search for adUrl
from emulatorjs.
Hi @ethanaobrien , thanks for your reply. I will make a few tests and let you know ;-)
from emulatorjs.
Hello, on line 14653 is the code for the adUrl embedding. You might be able to put it in there. search for the code
if (typeof _0xc6823.adUrl === 'string') {
To make it to where the user can only click it after the video ends, you can probably edit the setTimeout feature or edit the setTimeout to show the
x
button. search foradUrl
Hi @ethanaobrien , I tried to implement the Ad URL straight into the emulator.js like below:
Line 14653:
if (typeof _0xc6823.adUrl === 'https://mysite.com/ad.html') {
and
Line 14656:
'src': https://mysite.com/ad.html,
But it didn't work :-(
It only works if I add this line:
EJS_AdUrl = 'https://mysite.com/ad.html'
Like the code below:
<script type="text/javascript">
EJS_player = '#game';
EJS_gameUrl = 'files/snes/Donkey-Kong-Country.zip'; // Url to Game rom
EJS_core = 'snes';
EJS_mouse = false; // SNES Mouse
EJS_multitap = false; // SNES Multitap
EJS_pathtodata = 'data/'; //path to all of the wasm and js files. MUST all be in the same directory!!
//EJS_AdUrl = 'https://mysite.com/ad.html' //path to AD page
</script>
<script src="data/loader.js"></script>
Is it possible to add the Ad URL straight into the emulator.js file?
Thank you!
from emulatorjs.
if (typeof _0xc6823.adUrl === 'https://mysite.com/ad.html') {
is not proper javascript (unless you have a type named https://mysite.com/ad.html
) it must be kept as if (typeof _0xc6823.adUrl === 'string') {
To specify it in the emulator.js file, search for the code //_0x2ba0e6.adUrl = 'https://www.youtube.com/embed/8vkh9UO3PnA'
, remove the //
from the beginning and change the youtube link to the link of your ad page
from emulatorjs.
Thanks for your quick reply @ethanaobrien !
It's not working for me as you can see in the test page below :-(
Test page - https://coolstuffblast.com/games/test.html
Emulator.js file was modified as per your instructions above.
from emulatorjs.
Seems to work fine, just takes a sec to load (as ads always do)
from emulatorjs.
Hi @ethanaobrien , that's really strange ... I have cleared my Google Chrome cache, Cloudflare cache, I even tried anonymous browser and it was not working lol ... I had to flush my DNS via CMD to see it was working :-)
Thank you for your help!
The banner ads was an easy implementation via emulator.js , just trying to figure it out how to implement the video pre-roll now.
Is there any easy way to call an ad url from emulator.js to load before the emulator loads using the whole game frame 640x480 pixels?
Thanks in advance for all your help and support!
from emulatorjs.
No, this isn't possible in javascript to check if the ad is loaded. Sorry
from emulatorjs.
Hi @ethanaobrien , thanks for your reply.
It doesn´t need to check if the ad is loaded, just need to call and load the ad url in the whole game iframe as soon as it loads the emulator. The video pre-roll script will have the close button and the time set up to work it by itself.
The result would be similar to this one - https://neptunjs.xyz/snes.html
But it would load the video pre-roll ad before ;-)
from emulatorjs.
Sorry for the late reply, got busy then I just kept forgetting to respond.
It doesn´t need to check if the ad is loaded, just need to call and load the ad url in the whole game iframe as soon as it loads the emulator. The video pre-roll script will have the close button and the time set up to work it by itself.
This is what it does, the moment the emulator loads the iframe is created and starts loading
from emulatorjs.
Hi @ethanaobrien , thanks for your reply.
In the new emulator, I couldn't find the code: //_0x2ba0e6.adUrl = 'https://www.youtube.com/embed/8vkh9UO3PnA'
in the emulator.js file.
How to implement the Ad URL inside the new emulator.js file?
Thanks in advance for all your help and support!
from emulatorjs.
Bottom of the emu-main.js
file. Search for this.adUrl =
from emulatorjs.
@xxxnewbiexxx Did you ever get this working? Can I close this or?
from emulatorjs.
Hi @ethanaobrien, just the banner is working at the moment, still working on the video pre-roll implementation ...
from emulatorjs.
Im going to assume you've got this under control
I'm closing since this isn't technically an issue, but a question
from emulatorjs.
Hi @ethanaobrien , have you done any change to the code that skip modifications on emu-main.js ?
I tried to implement the ad URL inside emu-main. js file changing this line:
this.adUrl = null;
to this:
this.adUrl = 'https://mysite.com/adurl.html';
but it's not working :-(
Thanks in advance for all your help and support!
from emulatorjs.
from emulatorjs.
Thanks for your reply @ethanaobrien ! How can I define it in the loader.js file?
I tried this:
'undefined' != typeof EJS_AdUrl && (config.adUrl = 'https://mysite.com/adurl.html');
but it didn't work ...
from emulatorjs.
from emulatorjs.
Set the config ad url to your site instead of the window variable
How to set this @ethanaobrien ? Could you please help ?
from emulatorjs.
Related Issues (20)
- [Bug] Issues with Sega Mega Drive game not starting. HOT 15
- [Bug] Issue With Code Editor HOT 8
- [Bug] HOT 1
- [Bug] A key and S key override custom bindings on GBA HOT 18
- Folder "docs/System" does not exist HOT 1
- [Bug] the focus on the game disappears when opening to full screen HOT 1
- [Enhancement] Enable/Disable Outdated Graphics Driver autocheck function HOT 6
- [Platform Request] Add all platforms supported by VICE HOT 1
- Create NPM release HOT 3
- [Bug] Can't Find The Keybinds To Eject And Swap Side Of FDS Disk. HOT 6
- I Can't Get Arcade Games To Work HOT 4
- Performance issues HOT 1
- N64 Bizzare Polygon Bug. HOT 1
- [ REQUEST ] Option to disable the right click menu HOT 1
- [Request] Method to browse and download files from the EJS file system
- It is very slow [Bug] HOT 1
- Add turbo keys to the nes emulator HOT 2
- [Bug] Not working folowing the get started HOT 5
- [Bug] Saves are broken for code editor HOT 2
- Any plans for supporting Webpack/TypeScript
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emulatorjs.