You are on page 1of 59

var cam = new CameraCaptureTask();

//
cam.Completed += new
EventHandler<PhotoResult>(this._cameraCaptureCom
pleted);
// (try/catch)
cam.Show();

var cam = new CameraCaptureTask();


//
cam.Completed += new
EventHandler<PhotoResult>(this._cameraCaptureCom
pleted);
// (try/catch)
cam.Show();

Mango
OS
Mango
AR

(AR MissileiPhone)

20117FxUG


void _cameraCaptureCompleted(object sender, PhotoResult e) {
//
if (e.TaskResult == TaskResult.OK)
{
//Stream
this._photo_stream = e.ChosenPhoto;
//
var image = new BitmapImage();
image.SetSource(e.ChosenPhoto);
this.image_ctr.Source = image;


void _cameraCaptureCompleted(object sender, PhotoResult e) {
//
if (e.TaskResult == TaskResult.OK)
{
//Stream
this._photo_stream = e.ChosenPhoto;
//
var image = new BitmapImage();
image.SetSource(e.ChosenPhoto);
this.image_ctr.Source = image;

var photo_name = hoge_image";


var lib = new MediaLibrary();
//
photo_stream.Seek(0, SeekOrigin.Begin);
lib.SavePicture(photo_name, photo_stream);


MediaLiblary
Microsoft.Xna.Framework

SilvrlightXna

// var()

var pix = new PhotoChooserTask();


pix.Completed += new
EventHandler<PhotoResult>(_choosePhotoCompleted);
// true
pix.ShowCamera = true;
pix.Show();

DEMO

MediaPlayer
MediaPlayerMediaLibrary
Microsoft.Xna.Framework
XNA


var timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromMilliseconds(50);
timer.Tick += delegate
{
FrameworkDispatcher.Update();

//
};

timer.Start();


MediaPlayer
MediaPlayer.Queue.ActiveSong.Duration;
MediaPlayer.PlayPosition;
MediaPlayer.Queue.ActiveSong.Album.Name;
MediaPlayer.Queue.ActiveSong.Artist.Name;
MediaPlayer.Queue.ActiveSong.Name;

MediaPlayer
MediaPlayer.IsShuffled //
MediaPlayer.IsRepeating //

MediaLibrary
Var library = new MediaLibrary();

this._song_collection = library.Songs;


Twitter

Twitter

Oauth
(TwitterIDPASS


Twitter

Oauth
http://twitt.codeplex.com/


Twitter
Windows Phone 7xAuth

http://d.hatena.ne.jp/kabakiyo/20100827/128291
9495

DEMO:
DEMO

MS
()

http://msdn.microsoft.com/ja-jp/windowsazure/claudia00_03


// MediaElement
this.mediaElement.Source = new
uri(resources/40chui.wav);
this.mediaElement.Play();

WebSilverlight

DEMOSpeakMemo
Sound Recording in Windows Phone 7

http://archive.msdn.microsoft.com/mag201102
UIFrontiers


//
Var mic = Microphone.Default;
mic.BufferReady += OnMicrophoneBufferReady;


//
var playback = new
DynamicSoundEffectInstance(microphone.Sampl
eRate, AudioChannels.Mono);
playback.BufferNeeded +=
OnPlaybackBufferNeeded;


//
mic.Start();
//
mic.Stop();


//
int size =
mic.GetSampleSizeInBytes(mic.BufferDuration);
//
byte[] extraBuffer = new byte[size];
//
int extraBytes =
microphone.GetData(extraBuffer);

Using (IsolatedStorageFileStream stream =


storage.CreateFile(memoInfo.FileName))
{
stream.Write(extraBuffer, 0, extraBytes);

Using (IsolatedStorageFileStream stream =


storage.CreateFile(memoInfo.FileName))
{
stream.Write(extraBuffer, 0, extraBytes);


// byte(
buffer)
playback.SubmitBuffer(buffer);
playback.play();

SmoothStreaming

this.mediaElement1.AutoPlay = true;
this.mediaElement1.Source = new
Uri("http://coelacanth.heteml.jp/sl7_video_bord
/vb.wmv");

MediaElement


SmoothStreaming
Smooth Streaming


SmoothStreaming

IIS Smooth Streaming Client 1.5

727au
WindowsPhone7!!

WindowsPhone7 !!

OS(Mango)
Phone7Mango

(Mango2
)

Mango

What's New in Silverlight for Windows Phone


http://msdn.microsoft.com/enus/library/hh237342%28v=VS.96%29.aspx


Webcam and Microphone
You can now capture source input from the user's audio device or
video device. The CaptureImageAsync method enables simple
capture scenarios and the VideoBrush.SetSource method enables a
simple video playback scenario. Webcam and microphone capture
both use a sink metaphor for establishing a listener class, and
obtaining a capture requires client user permission for capture
device access.
Improved Image Support
Windows Phone devices now support 32 bit-per-pixel (bpp) images.
The default is 16 bpp, but you can change this setting in the
WMAppManifest file to 32 bpp. For more information, see
Application Manifest File for Windows Phone.

DEMO:VideoPuzzler
http://www.electronista.com/articles/11/06/30/w
p7.mango.camera.app.has.button.for.front.camera
s/


Mango2(RC)

iPhone, AndroidWindowsPhone7

You might also like