How to play a audio like spotify premium while the user is playing a song - html

I know this sounds stupid but i am new to this and get stared with html. I am creating a streaming website and i want to monetize it. Is there a way to randomly advertise it like spotify premium. I have already created the sound tracks for the audio which i want to play. Hope somebody helps me. Thank You

I think that your question involves much more than just learning basic HTML, however if I understand it correctly I would implement the following logic to "randomly advertise":
Create a login feature for your application that separates premium from non-premium users
When playing audio for a user, create a function that identifies if the user is in fact in the premium tier and, based on the result, either:
a) If the user is not in the premium tier, play your advertising audio tracks after every other track
b) If the user is in the premium tier, play songs without advertisements in between them
Hope this helps, but keep in mind that your question should be way more specific in order for the answers to be helpful for actual issues regarding your code or implementation.

Related

Video recording/playback/storage for website

I would like to implement video recording/playback/storage capability for my website. I'm done a bit of research, for HTML5 recording, there is RecordRTC which is based on WebRTC. For playback there's video.js. I want to be able to store them on s3 but I haven't figured out how.
1) Is this the best way to do it without paying for cloud based commercial ones such as ziggeo, nimbb and pipe?
2) are there any alternatives that i should look into?
3) how does storage work after recording using RecordRTC and uploading to s3? Do i need to do any sort of compression?
Any help would be great! Really appreciate it
Video recording is the future of all websites in our eyes - and by our I mean here at Ziggeo (full disclosure, I work at Ziggeo :) ).
In regards to recording there are many ways to do it and it is up to you to go with a specific one or implement all of them, so you could do it through Flash, WebRTC (https://webrtc.org/), or ORTC (https://ortc.org/).
We are currently offering you to record using WebRTC plus fallback with Flash and are working on implementing ORTC as well.
Now as mentioned above, there are many ways to do it and it is up to you, however it is up to your end users also since they might not be able to record over flash due to company policy or your website is on HTTP so you can not use WebRTC, etc.
With your own implementation you need to run the numbers and combine it all together (and work on keeping it up and running), while here at Ziggeo we do that for you and keep improving our SDKs and features.
Further more we also allow you to push the videos to S3 buckets, FTP, YouTube and Facebook - soon to DropBox as well.
So if you are like us, you will probably like to go down the road of do it yourself. If you however want to have time to work on your website, apps, and other things and just have the video, I do suggest using some service.
In regards to compression. It is good to mention that we do transcoding of all videos that are uploaded to our servers (You can see more here: https://ziggeo.com/features/transcoding). There is an original video that is kept and next to it the transcoded video (which can have watermark or some effects, etc. while it does not need to).
In general you want to 'standardize' the uploaded videos since different browsers will give you different video data containers and this would give you the upper hand so that it is easier to make adjustments to them later on for preview depending on the browser that is used.
To summarize:
1) - This depends on what kind of recording/playback and storage you need. If it is professional then using a service such as Ziggeo will help you focus on the important part of your service - like website design, functionality and similar, while if it is for fun and play you still have a free plan on Ziggeo, or you could get your sleeves up and do some codding :)
2) - I would personally look into WebRTC and ORTC if I was making implementation myself to see which one I would need more (or would be easier for me to implement). Once you find the one that you like, they usually offer some suggestions on their forums with what works best for them. (Be prepared however to need flash implementation at some point as well if it is business related setup)
3) It is best to standardize what you store in terms of resolution, video data containers and similar and often it is good to keep the original videos as well, so that you can always re-encode them if that is needed (which can happen in early stages of development).

Display a league table on a webpage?

Me and a few of my mates are doing a FIFA league between us. I have a server I could upload the league table to. At the minute I'm using a spreadsheet with formulas to work out the points, and the goal difference. Very simple stuff, but saves me having to change everything and I instead just change the wins, draws, losses and goals scored, conceded. The problem is, a lot of the guys use their phones to participate in our chat online, and can't view the spreadsheet on the phone.
So what I'm looking help with is, I know I can create a html table, but is there anyway I can include formulas in it?
For something this simple, I would recommend Google Docs. You can just upload your spreadsheet It's very easy to use, you can share your spreadsheet with others and it can be viewed in any web browser, or via the Google Docs app available on android and ios.
Otherwise, you can learn Javascript to do the calculations for you in your html table. Which is also very easy to do, but if you've never used Javascript, it can be a little overwhelming at first. If you need help with some Javascript, let me know and I can walk you through it (if you decide to choose this route)

What is allowed in in-app purchases

I would like to have some info about apple's in-app purchases option.
I can't seem to find any place where they are explaining what is actually allowed. Becaus i wanted to make a digital bookstore with interactive books in asctionscript and offer the user interactive books (seperate swf files) via in-app purchases but apparently it is not allowed to have any code in your swf file, so that option is out of the window (btw if anyone knows of another option instead of swf files, please let me know).
Then have have thought of maybe starting in cocos2d but again i have no idea how i would distribute separate interactive books to the users. What are the options here?
So my questions are: what is allowed with in-app purchase, how can i offer interactive books (with posibility to click on elements and view animations etc) through in-app purchases.
And secondly and more important:
Would it be possible to do it via as3.0? Preferably i would like to do it through actionscript but can anyone tell me if its possible? Can i offer the user interactive books with elements that are pressable and animations etc through in-app purchases? And having all the books inside the application and unlocking them is not an option. I want to be able to provide books separatly.
Definitely on the right track,
I think if you are looking to do an animated books series or something that's more interactive that a simple text format you should be fine using In-App Purchases for this. You'll only get in trouble if you're duplicating something iBooks can already provide.
You'll need an ANE to give you access to the InApp Purchases API from AS3, there are a few out there and I'll shamelessly plug mine:
http://distriqt.com/native-extensions#in-app-purchase
The major problem you'll have is actually distributing the additional content, as you may not be able to load in a swf and play it in a compiled iOS AIR application as you would a normal flash/AIR application. You'll have to do some research and see if you can create a player that just loads images and animation sequences (in xml or other).
Good luck
1) You can't play swf files on the iPhone. Not without converting them to HTML5 or video. Which probably makes them non-interactive (not sure about HTML5).
2) Downloading any executable code to an iOS device is out of the question. There are some gray areas, for example downloaded Lua scripts which only contain data but due to their nature are executable code. It's a risk to do something like that, instead of just downloading XML or pure text/binary files.
3) Apple never tells you exactly what is allowed. They tell you what is not allowed, and even there they remain vague. There are always some gray areas and Apple reserves the right to define whether something in the grey area is acceptable to them or not. If you think your app is in the gray area, you need to have a backup plan in case Apple won't like it, or removes the app because they didn't initially find something wrong with it but later changed their mind.
4) Read the iOS Developer Program License Agreement and the App Store Review Guidelines. You may need to re-read some sentences because it's somewhat lawyer speak, though not really that hard to understand.
5) There are no guarantees. Best option: look at apps like yours and see if you can find your payment model implemented by other apps. If you find several such apps, it's most likely ok to do that. If you can't find any app that does something even remotely like you want to do it, beware.
6) I think you're on the wrong path. Use iBooks. Problem solved.

Can I make a chatroom for a network?

As an example if I have a small group of people at a college and I want to create a chat room application which each user can download and then open to view list of all available users to talk to and click one of the users in a list then a window pops and any text you enter goes to that specific person. How can I make this? I have made a chatroom using AJAX and html etc but I have never done a chatroom for a network such as the one you have in schools or work places. What language would I need? All help is appreciated since I am total new to this.
I read something on internet about winsock connections but there wasn't much I could find.
You can use sockets for network programming in java.
Look at this Deitel's tutorial about a java messenger application.
http://www.deitel.com/books/jhtp7/DeitelMessenger.pdf

Get a users Xbox Achievements list?

Is there a way to get a user's achievements list from Xbox without dealing with screen scraping etc.?
How do sites like http://www.trueachievements.com do it? (they're definitely not screen scraping as they do not have my Live ID credentials...)
I know there's the Xbox LIVE Community Developer Program (XCDP) that provides some API but they do not provide achievements information as far as I can tell (links below)
http://duncanmackenzie.net/Blog/put-up-a-rest-api-for-xbox-gamertag-data
http://file-pasta.com/file/XML_Feeds.pdf
If you want this information you can check out my new site https://xboxapi.com.
Again if your profile is public then you can see friends, games and achievements. This has taken me over a year (on and off) to code and is now in public beta. To date it has served nearly 2,000 requests and growing. I am still working on optimising this script and it should only get better in time.
I currently have an API request limit setup for 120 requests per hour per IP.
Lets hope there are no major updates to xbox.com any time soon.
It says at the bottom of the TrueAchievements website that they are a member of the Xbox LIVE Community Developer Program. That leads me to believe that the XCDP does give information about achievements. Duncan Mackenzie's API for xbox worked for me for a little while, but then his web service seemed to go offline. Duncan also says that his web service will not be returning sadly. I can't get ahold of him to ask for release of his source code. I'm currently looking for another solution in retrieving the data. Unless I can get official access with XCDP, it looks like I'll have to do screen scraping. The screen scraping approach is not going to be pretty though. I'll let you know if I get any more information.
The current XCDP API does not give you any individual achievement information. At the moment the only way to get achievements is by page scraping and as of a couple months ago Microsoft has removed their non-JS log in form for xbox.com making it very difficult to log in. TA has found a way to get around this but he's trying to monopolize the scene and isn't willing to help others on this topic.
Even though TA does not have your LIVE credentials if your xbox.com page is public and if you give them your gamertag anyone can get your information by going to http://live.xbox.com/en-US/GameCenter?compareTo=GAMERTAGHERE
With the change the Microsoft has done they've also modified achievement icons. If you're looking at a friends profile and if you don't have the game or have unlocked the achievement the icon will be monochromatic even if it's unlocked by that person.