Determine the exact time for which my file has played - automation

I want to calclute the duration for which my file has played...I am not sure what appoach to use.
Say for eample i have played an AV file on WMP and duration of the file is 30sec.now i want to checkh wether the file actually played for 30sec or less?

You can use some kind of timers in the programming language of the future implemenation.
Here are some samples of using it in C#:
dotnetperls: Timer
MSDN: Timer Class
and in Java:
asjava: Java Timer Tutorial
javarevisited.blogspot.de: Timer

You would have to implement a plug-in for every media player that you want to play your file on and detect the duration for which it was played. Different media players would have their own SDKs, plug-in APIs and the languages you can write the plug-in in.
For Windows Media Player you'll have to write a background plug-in (that exposes no visible user interface) in Microsoft Visual C++ using Visual Studio's WMP Plug-in wizard. Check out the relevant MSDN site for details.
What you're asking is similar to how Last.fm works. It's a music recommendation engine that installs Last.fm Scrobbler to scrobble (add to your online profile) the songs that you listen to on your media players. You can then access your account and see some interesting statistics like your Top Artists This Month.
But, what's relevant here is that a track gets scrobbled only when you've listened to more than half of it and the way it tracks the duration of play (along with the song, artist and album name) is through media player plug-ins. See Which media players are supported?

Related

Publish audio when already publishing video with Ant Media

I try to reproduce a classroom in which a teacher will publish video and audio and student only video at first.
Students can raise hand and teacher can accept to leave the student speak (all with dataChannel). I tried to change the mediaConstraints (enable audio) but as WebRTCAdaptor is basically stateless, it does not change a thing. Is there a simple way to publish audio as video is already published, as I cannot publish twice either.
If you create a WebRTCAdaptor with a disabled audio, user would not be able to speak later.
But you can use the Un/Mute mic funtions for that. As an example:
webRTCAdaptor.muteLocalMic() would mute the microphone and webRTCAdaptor.unmuteLocalMic()
These functions are included in the sample conference.html file.
You can use these functions for your case.

Streaming movies from my server

I'm playing around to make an app that lets people stream cartoons that I make. It's a very simple app, one ImageView is just loading in a html-homepage in a UIWebView. Witch contain links to .mov files. So if you tap them a movie will start playing. This is because I just want to update the html-file with new cartoons every week.
Is this an "ok" way to do things code:ing-wise? Or am i obligated to us some Objective-c streaming functions?
Is there a specific file-type that i have to use in the movie-files on the server?
Is the HTML static in your app, or does it point to a server? If it's the former, you may be able to get the app approved doing it the way you suggested, depending on the reviewer. If it's the latter, you're unlikely to get it approved by apple.
They tend to frown upon web sites bundled into apps, and will tell you to simply make your website usable with the phone. See section 2.12.
My suggestion is to spend a bit more time and offer iOS users a better - and more immersive - experience than is available via the web. As I'm sure you've found, there are many built-in ways to stream movies and to present them in a manner that surpasses a web-page-like experience.

Streaming music on your website through custom player / application (iTunes)

I was doing some research to find out ways that would allow me to stream music on my website legally. I came across iTunes partner program which allows to stream music on a website through their embedded players. I was wondering is it possible to stream iTunes music through your own custom player? If that is not possible via iTunes, then what other methods are available?
You could do this with a server software like Icecast, there is some good tutorials on setting this up here: http://www.icecast.org/docs.php
Depending on how many browsers you want to support you might want to setup two streams, one in MP3/OGG and a "backup" stream in Flash. Then add some detection as to what the browser supports and present the correct stream (i.e.: Use the HTML5 <audio> tag for playing MP3/OGG to browsers that support this, and use your flash stream for the rest)
their program allowing playback of music in the iTunes Store is likely only for those with the intention to sell music, without providing a commerce business, you'd be breaking their partner program T&C's.

Application-Bridge for iChat Audio Channels

There is a feature in GarageBand that allows you to record iChat Audio sessions directly into GarageBand. When you are the host of an iChat conference (you called the other party/parties), you can open GarageBand and hit record, and GarageBand will ask you if you wish to record the conference. Say yes, and GarageBand creates distinct tracks for all members of the conference, and records isolated audio from them into their own channel, complete with their username (or real name as determined by Address Book), and Avatar.
I'm interested in finding a way to connect this feature into other software.
First: Is this API documented? (I am not a paid Apple Developer.)
Second: Would it be possible to write a piece of software that would take these iChat audio channels, and create them as sound devices? Ideally this would be similar to the way Soundflower works to create a sound source that is a composite of all sound sources.
In theory, this would enable ANY recording application to take advantage of this iChat feature, as opposed to just GarageBand, without the need for a custom audio channel bridge for every individual piece of recording software.

Access to iTunes Ratings Data

We want to write a Windows/OS X app that sends podcast ratings info from an iPod and iTunes back to a server. Two questions:
Is there documentation for how ratings data are stored in iTunes,
if a user has iTunes set to auto-delete programs he has heard, is there a way to capture the ratings data before it's gone?
I doubt there is an official spec on the data file format, but you can find rating info in the "iTunes Music Library.xml" file in the iTunes directory. Look for a key called "Rating" with an integer value from 0 to 100. It won't be there if the user hasn't rated the item. For example, a 4-star rating will have a value of 80.
itunes stores its Music Library data and Ratings in an XML file on the user's machine. In windows its located in the "Music" or "My Music" folder.
You can open the "iTunes Music Library.xml" file and look for the Rating element to see what the user rated each song. Since its XML, it's pretty self-explanatory. That should be pretty easy to open and parse from the program you're writing.
I think iTunes doesn't remove the podcasts from its xml file until the program is closed. You should be able to grab that rating data as long as itunes is still open.
In addition to the xml file, there is also a COM interface that will give you access to all of the library info, including the rating for each song. The SDK is documented.
I don't know what language you want to use, but I have used the C# to interface with iTunes and it was very smooth.
You can download the SDK at http://developer.apple.com/sdk/