Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Youtube Video and Filedownload  (Read 1911 times)

0 Members and 1 Guest are viewing this topic.

etixpp

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
    • FoxFire Development Website
    • Email
Youtube Video and Filedownload
« on: June 05, 2014, 05:04:57 pm »
Hello,
2 small questions:
1. Is it possible to embbed a youtube Video to a sfml renderwindow?

2. Is it possible to download a file (at example a .exe) with http request? Maybe a small code snippet somewhere flying arround? D:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Youtube Video and Filedownload
« Reply #1 on: June 05, 2014, 05:06:38 pm »
Hi

1. Not easily. You need a video player and an HTML interpreter.

2. Send a GET request to the file URL and save the response's body to your disk.
Laurent Gomila - SFML developer

etixpp

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
    • FoxFire Development Website
    • Email
Re: Youtube Video and Filedownload
« Reply #2 on: June 06, 2014, 04:23:42 am »
Could you give me some advice regarding the youtube video stuff?
Maybe link to a good library / player i could use for this.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Youtube Video and Filedownload
« Reply #3 on: June 06, 2014, 07:50:12 am »
I have no idea, sorry.
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Youtube Video and Filedownload
« Reply #4 on: June 06, 2014, 07:52:38 am »
Did you even try to find a solution on your own? ;)

Ebedding a YouTube video is a rather specific task, plus embedding videos is originally meant for the web. You could probably use something like webkit or awesomiun to get a HTML 5 player, but I can tell you, it won't be just a few clicks. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/