title: how to play embed OneDrive video on my end?
body: <p>Not really sure if I can ask this so I hope its ok. I have my site where I would like to embed <strong>and play</strong> video which is stored on OneDrive cloud service. So far it sounds easy, however here's the thing: while I am actually allowed to embed it via provided embed iframe code, it can't be played unless its redirected on OneDrive site. I did my research all over the internet but it looks like dead end and no one really solved this mistery. This is what I got:  </p>
  
  <p><strong>Official embed link:</strong><br>
  <code>&lt;iframe src="https://onedrive.live.com/embed?cid=5FAC7D8A540D1B7A&amp;resid=5FAC7D8A540D1B7A%21141&amp;authkey=AM3Y3EuRuTPbKo0" width="320" height="240" frameborder="0" scrolling="no" allowfullscreen&gt;&lt;/iframe&gt;</code>  </p>
  
  <p>This embed is not playable from my site. after I press Play button it will redirect me to:  </p>
  
  <p><code>https://onedrive.live.com/redir.aspx?cid=5fac7d8a540d1b7a&amp;resid=5FAC7D8A540D1B7A!141&amp;parId=5FAC7D8A540D1B7A!140&amp;authkey=!AM3Y3EuRuTPbKo0</code>  </p>
  
  <p>then here:  </p>
  
  <p><code>https://onedrive.live.com/?cid=5fac7d8a540d1b7a&amp;id=5FAC7D8A540D1B7A%21141&amp;sff=1&amp;authkey=!AM3Y3EuRuTPbKo0</code></p>
  
  <p>and finaly here where I can play it:  </p>
  
  <p><code>https://onedrive.live.com/?authkey=%21AM3Y3EuRuTPbKo0&amp;cid=5FAC7D8A540D1B7A&amp;id=5FAC7D8A540D1B7A%21141&amp;parId=5FAC7D8A540D1B7A%21140&amp;o=OneUp</code></p>
  
  <p><strong>Official share link:</strong><br>
  <code>https://onedrive.live.com/redir?resid=5FAC7D8A540D1B7A!141&amp;authkey=!AJVBaVimMA1e0cc&amp;ithint=video%2cmp4</code>  </p>
  
  <p>From this I found a way how to create direct download link by changing redir part with download:  </p>
  
  <p><code>https://onedrive.live.com/download?resid=5FAC7D8A540D1B7A!141&amp;authkey=!AJVBaVimMA1e0cc&amp;ithint=video%2cmp4</code>  </p>
  
  <p>It can be put into <code>&lt;iframe&gt;</code> or <code>&lt;video&gt;</code> but it still can't be played. Also is possible to change redir to embed:  </p>
  
  <p><code>&lt;iframe src="https://onedrive.live.com/embed?resid=5FAC7D8A540D1B7A!141&amp;authkey=!AJVBaVimMA1e0cc&amp;ithint=video%2cmp4" width="320" height="240" frameborder="0" scrolling="no" allowfullscreen&gt;&lt;/iframe&gt;</code>  </p>
  
  <p>which is pretty much same as official embed link. Then there are also strings like: <code>&amp;em=2</code> and <code>&amp;Embed=1</code> (not really sure what they stand for, but they do change redirected output) Example:  </p>
  
  <p><code>https://onedrive.live.com/embed?resid=5FAC7D8A540D1B7A!141&amp;ithint=video%2cmp4&amp;em=2&amp;Embed=1</code>  </p>
  
  <p>From what I understand these listed strings can be always skipped:<br>
  <code>?cid=5FAC7D8A540D1B7A</code><br>
  <code>&amp;authkey=AM3Y3EuRuTPbKo0</code><br>
  <code>&amp;ithint=video%2cmp4</code><br>
  <code>&amp;id=5FAC7D8A540D1B7A%21141</code><br>
  <code>&amp;parId=5FAC7D8A540D1B7A%21140</code><br>
  <code>&amp;o=OneUp</code>  </p>
  
  <p>With this, I am at point where embed is not embed at all. Its like new word to "redirect me to OneDrive and play me there". Ofcourse I also tried to get help at OneDrive support, but they play stupid! and keep asking me why would I need to play my video on my site when I can play it on my drive just fine. Apparently they mocking me. I am not really tryin' to use them as my ftp server (and even if I would its not their bussines till I violate their code of conduct), I just want to play my embed video on my site like I would with Youtube, Vimeo or Dailymotion. (Well, to be honest it wouldnt bother me so much if I wouldnt already purchased 2TB storage)  </p>
  
  <p>I in the end I looking for "true embeding" or at least "direct link" like I found when it comes to images: <a href="http://1drv.ms/1PbOhF8" rel="nofollow">http://1drv.ms/1PbOhF8</a> where direct link is: <a href="https://u6gkqq.dm2303.livefilestore.com/y3mtdqmTctG9LFmZ_HLl1tYgUkWTiB8xkCZ0-nOKP2_SLzkuVXtzJzhavaA8axBWlqrVezVbDjA4bO-8AJjbVSp_Yc3luKWSiMVuhvRhnvYFie_FfOEQldmztKVtOlxGrG18AIftsAbOwfXORrB8TZ1EPZYFmKQ6KfmA8Q2TWqStxE/%D0%9D%D1%8C%D1%8E-%D0%99%D0%BE%D1%80%D0%BA-%D0%B0%D0%BC%D0%B5%D1%80%D0%B8%D0%BA%D0%B0-%D0%BA%D1%80%D0%B0%D1%81%D0%B8%D0%B2%D1%8B%D0%B5-%D0%BA%D0%B0%D1%80%D1%82%D0%B8%D0%BD%D0%BA%D0%B8-Tilt-Shift-2344711.jpeg?psid=1" rel="nofollow">https://u6gkqq.dm2303.livefilestore.com/y3mtdqmTctG9LFmZ_HLl1tYgUkWTiB8xkCZ0-nOKP2_SLzkuVXtzJzhavaA8axBWlqrVezVbDjA4bO-8AJjbVSp_Yc3luKWSiMVuhvRhnvYFie_FfOEQldmztKVtOlxGrG18AIftsAbOwfXORrB8TZ1EPZYFmKQ6KfmA8Q2TWqStxE/%D0%9D%D1%8C%D1%8E-%D0%99%D0%BE%D1%80%D0%BA-%D0%B0%D0%BC%D0%B5%D1%80%D0%B8%D0%BA%D0%B0-%D0%BA%D1%80%D0%B0%D1%81%D0%B8%D0%B2%D1%8B%D0%B5-%D0%BA%D0%B0%D1%80%D1%82%D0%B8%D0%BD%D0%BA%D0%B8-Tilt-Shift-2344711.jpeg?psid=1</a>  </p>
  
  <p>I mean, there must be a way how to actually get direct link of stored file even if its video, right?  </p>
  
  <p>I even tried to insert video into my desktop MS PowerPoint 2013 and then upload it on OneDrive, get embed code, place it on my site and play it on my site. Problem is that such embed presentation can be viewed only by me and also only outside of fullscreen mode (entering into fullscreen will lead to redirect on OneDrive again). Here I attach share link + embeds:  </p>
  
  <p><code>http://1drv.ms/1Z33Xox</code>  </p>
  
  <p>Embed from online OneDrive storage:<br>
  <code>&lt;iframe src="https://onedrive.live.com/embed?cid=5FAC7D8A540D1B7A&amp;resid=5FAC7D8A540D1B7A%21143&amp;authkey=AMrmlVIx_LeyX_g&amp;em=2" width="402" height="327" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;</code>  </p>
  
  <p>Embed made from embeded embed:<br>
  <code>&lt;iframe src='https://onedrive.live.com/embed?cid=5FAC7D8A540D1B7A&amp;resid=5FAC7D8A540D1B7A%21143&amp;authkey=AMrmlVIx_LeyX_g&amp;em=2&amp;wdAr=1.7777777777777777&amp;Embed=1' width='402px' height='327px' frameborder='0'&gt;&lt;/iframe&gt;</code>  </p>
  
  <p>Now, interesting is that for playing this presentation is used native HTML5 player. While on "share link" right-click menu is disabled (with <code>oncontextmenu="javascript:return false;"</code>), but while in embed mode, right-click menu is enabled however there is missing fullscreen on controls (<code>allowfullscreen</code>). Unfortunately video cant be saved or opened in new tab, because it will trigger downloading of some "mediahandler.ashx" file which is infact my video file with renamed extension! This is the address:  </p>
  
  <p><code>https://powerpoint.officeapps.live.com/p/mediahandler.ashx?PV=6&amp;PF=5&amp;Fi=SD5FAC7D8A540D1B7A!143&amp;C=5_810_DM2-SKY-WAC-WSHI&amp;ak=t%3D0%26s%3D0%26v%3D%21AMrmlVIx%5FLeyX%5Fg&amp;z=257&amp;usid=9992f846%2D2470%2D4a99%2Da07d%2Da26ffa761de7&amp;Rid=2041958409%2Emp4%2Emedia&amp;waccluster=DB3B&amp;retries=3</code>  </p>
  
  <p>which will redirect here and trigger download of ashx file -  </p>
  
  <p><code>https://powerpoint.officeapps.live.com/p/mediahandler.ashx?PV=6&amp;PF=5&amp;Fi=SD5FAC7D8A540D1B7A!143&amp;C=5_810_DM2-SKY-WAC-WSHI&amp;ak=t%3D0%26s%3D0%26v%3D%21AMrmlVIx_LeyX_g&amp;z=257&amp;usid=9992f846-2470-4a99-a07d-a26ffa761de7&amp;Rid=2041958409%2Emp4%2Emedia&amp;waccluster=DB3B&amp;retries=3</code></p>
  
  <p>any ideas, please ?</p>