* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Listen to MP3 files but not download them  (Read 2077 times)

0 Members and 1 Guest are viewing this topic.

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 282
  • Post Rating Ratio: +15/-0
Listen to MP3 files but not download them
« on: April 15, 2017, 05:00:57 pm »
Situation: my dad wants to host a paid service, where people can pay for his own music to listen online. However, they should not have the possibility to download them, because the service is paid. I tried several tricks to hide them, or making it really hard to find. I tried htaccess, but if I then block the MP3, <audio> doesn't work anymore, so that doesn't help. Another idea was to copy the MP3 to a temp folder, load it in the <audio> tag, and then immediately remove the folder, but I can't get that working yet + an experienced person can easily remove the JS code to remove the folder. Also, in HTML5, there is an option to download the MP3 IMMEDIATELY. I can remove that with CSS, but again, an experienced user can display it again, and download it.

@c4ooo said I can maybe stream it, so downloading them second by second, which might work, so I might give that a try.

Any more ideas? :)



Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 745
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: Listen to MP3 files but not download them
« Reply #1 on: April 15, 2017, 05:20:21 pm »
Maybe base64 the mp3 file, decode it and then use the Web Audio API to play it ?
  • Calculators owned: TI Nspire CX, TI-89

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2300
  • Post Rating Ratio: +9/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Listen to MP3 files but not download them
« Reply #2 on: April 15, 2017, 06:11:44 pm »
if he gets the first beta running, I'd love to volunteer as a tester, trying to download the songs ^^
(got a lot of experience on the *regular* methods not involving special toos)
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Offline Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 3133
  • Post Rating Ratio: +32/-2
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • @juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
Re: Listen to MP3 files but not download them
« Reply #3 on: April 15, 2017, 08:36:12 pm »
You can use websockets to stream the music, use almost unreadable, minfied code so it will be quite hard to assemble it back together, you might even use encryption as an additional step, but keep in mind, someone will always be able to figure it out, because once you listen to it online, your browser is technically downloading it so you can listen to it.

Anyway, I'd recommend your dad not to reinvent the wheel and use things like Bandcamp, iTunes or Google Play as they do a good job for his use case.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
On semi-hiatus until who knows when. CODEWALRUS 2.0 COMING SOON
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Offline _iPhoenix_

  • Super User
  • Join Date: Mar 2017
  • Location:
  • Posts: 515
  • Post Rating Ratio: +12/-1
  • █████ ▼ ♪ Best music ♫
    • @dj_iPhoenix
    • @UCytgMNPxAMDsxjimvxHf01w
    • @the-legend-of-iphoenix
  • Gender: Male
Re: Listen to MP3 files but not download them
« Reply #4 on: April 15, 2017, 09:43:09 pm »
Also, you cannot stop me if I play it and record it (using a different device) while it is playing.

If you know someone is doing that to your music, you are a stalker with no life.
  • Calculators owned: A sentient TI-84+ CE, TI-85
  • Consoles, mobile devices and vintage computers owned: TI-99/4a home computer
Help me with a project by voting here! Thanks!

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 745
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: Listen to MP3 files but not download them
« Reply #5 on: April 15, 2017, 10:39:37 pm »
I told @P_T on irc that you could use this example as a base :
https://alexgibson.github.io/offlinewebaudio/

It's basically what i said : Encode the audio as base64 data, decode it and play it back with the Web Audio API.
He told me he was happy about it, even though most people would prefer to use streaming over that of course.
(since they can protect it and encrypt it more easily)

Also, you cannot stop me if I play it and record it (using a different device) while it is playing.
Also known as the (anal)ogue asshole.
That's why Hollywood resorts to DMCA letters these days :D
  • Calculators owned: TI Nspire CX, TI-89

Offline Juju

  • aka Yuki Kagayaki aka J̵̭͕͇ù̞̭̝̯̦j̴̭̙̗͖͡ù͏͓̲̕
  • CodeWalrus Staff
  • Super User
  • Server Maintenance
  • Moderator
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Inside a walrus
  • Posts: 3133
  • Post Rating Ratio: +32/-2
  • Couch potato
    • jul.savard
    • juju2143
    • @juju2143
    • juju2143
    • @julosoft
    • juju-kun
    • /u/juju2143
    • juju2143
    • @juju2143
    • Juju's shed
  • Gender: Female
  • WalriiPoints: 99999
Re: Listen to MP3 files but not download them
« Reply #6 on: April 15, 2017, 10:59:11 pm »
Well, yeah. For most of the music industry, the solution isn't always writing better code and safeguards, but sometimes it's more efficient applying copyright law, more specifically, the DMCA. Very liberally. And the biggest ones have good lawyers to back them up.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
On semi-hiatus until who knows when. CODEWALRUS 2.0 COMING SOON
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Offline aeTIos

  • Dabbler in C
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Ede, NL
  • Posts: 1049
  • Post Rating Ratio: +12/-0
  • hi
    • r_vdijk
    • /u/aetios
    • aetios
  • Gender: Male
Re: Listen to MP3 files but not download them
« Reply #7 on: April 15, 2017, 11:00:53 pm »
I'd use bandcamp. Simple, easy and contained solution.
ceci n'est pas une signature

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18878
  • Post Rating Ratio: +99/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Listen to MP3 files but not download them
« Reply #8 on: April 16, 2017, 12:07:27 am »
Bandcamp can do the job and is customizeable (layout, subscription options, stream options, etc) but it depends if he wants something customizeable. Bandcamp has an API, though, for webmasters.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline gameblabla

  • Super User
  • Join Date: May 2015
  • Location:
  • Posts: 745
  • Post Rating Ratio: +15/-7
  • TI-nspire porter
Re: Listen to MP3 files but not download them
« Reply #9 on: April 16, 2017, 06:36:58 pm »
Shush guys, his father will give him monez for the work.  :D
Of course most people will stick with Soundcloud or Bandcamp but if @PT_ can get some monez from his father,
you shouldn't say no guys.
  • Calculators owned: TI Nspire CX, TI-89

Offline p2

  • CodeWalrus Staff
  • Super User
  • Moderator
  • CodeWalrus Supporter
  • *
  • Join Date: Aug 2016
  • Location: Germany
  • Posts: 2300
  • Post Rating Ratio: +9/-0
  • *Wubba lubba dub dub*
    • KaliPhobos
  • Gender: Male
Re: Listen to MP3 files but not download them
« Reply #10 on: April 20, 2017, 01:20:30 am »
if he publishs his stuff on apple music, the files can be downloaded and shared, but they got markings that tell who is the guy gaving bought it from apple (who shared it) which is pretty hard to remove since regular tools wont help u much at this point.
So this already prevents big parts of the picary as noone wants to share a pirated file with his name on it ^^
  • Calculators owned: ti-83+, ti-84+, ti-84+, ti-84+se, ti-84+se(te), ti-nsphire, ti-nsphire CX-CAS, ti-voyage, ti-voyage, Who reads this list anyways...?
Anyway war sucks. Just bring us your food instead of missiles  :P ~ DJ Omnimaga (11.10.2016 20:21:48)
if you cant get a jframe set up, draw stuff to it, and receive input, i can only imagine how horrible your game code is _._   ~ c4ooo (14.11.2016 22:44:07)
If they pull a Harambe on me tell my family I love them ~ u/Pwntear37d (AssangeWatch /r/)
make Walrii great again ~ DJ Omnimaga (28.11.2016 23:01:31)
God invented the pc, satan the smartphone I guess ~ p4nix (16.02.2017 22:51:49)

Offline aeTIos

  • Dabbler in C
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Ede, NL
  • Posts: 1049
  • Post Rating Ratio: +12/-0
  • hi
    • r_vdijk
    • /u/aetios
    • aetios
  • Gender: Male
Re: Listen to MP3 files but not download them
« Reply #11 on: April 20, 2017, 03:44:45 pm »
Yeah, but apple music is extremely locked in, I wouldn't use it at all.
ceci n'est pas une signature

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18878
  • Post Rating Ratio: +99/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Listen to MP3 files but not download them
« Reply #12 on: April 20, 2017, 09:52:27 pm »
Plus anyone can just convert the file to a different format using any software or recording device anyway. But yeah the main topic here is to make it as hard as possible to download MP3 files while still allowing to stream them.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline PT_

  • Full User
  • Join Date: Mar 2016
  • Location:
  • Posts: 282
  • Post Rating Ratio: +15/-0
Re: Listen to MP3 files but not download them
« Reply #13 on: May 01, 2017, 11:22:38 am »
Can someone try to get the mp3 from this website WITHOUT recording it? http://www.oefenfiles.nl/ :D (I made something which should prevent downloading it, hopefully ;) )

Online xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18878
  • Post Rating Ratio: +99/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Listen to MP3 files but not download them
« Reply #14 on: May 01, 2017, 01:39:24 pm »
I will try on mobile and desktop later. I will also try to run DownThemAll on it to see if I can bypass protections or something.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games