Advertisement
Guest User

Untitled

a guest
Oct 6th, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. ## CSS font values
  2.  
  3. ```css
  4. -apple-system-headline1
  5. -apple-system-headline2
  6. -apple-system-body
  7. -apple-system-subheadline1
  8. -apple-system-subheadline2
  9. -apple-system-footnote
  10. -apple-system-caption1
  11. -apple-system-caption2
  12. -apple-system-short-headline1
  13. -apple-system-short-headline2
  14. -apple-system-short-body
  15. -apple-system-short-subheadline1
  16. -apple-system-short-subheadline2
  17. -apple-system-short-footnote
  18. -apple-system-short-caption1
  19. -apple-system-tall-body
  20. ```
  21.  
  22. ## iOS Airplay API
  23.  
  24. ```html
  25. <video id="video" src="my-video.mp4"></video>
  26. <div id="controls">
  27. <button id="playButton">Play</button>
  28. <button id="pauseButton" hidden>Pause</button>
  29. <button id="airPlayButton" hidden disabled>AirPlay</button>
  30. </div>
  31. ```
  32.  
  33. ```js
  34. if (window.WebKitPlaybackTargetAvailabilityEvent) {
  35. video.addEventListener('webkitplaybacktargetavailabilitychanged',
  36. function(event) {
  37. switch (event.availability) {
  38. case "available":
  39. airPlayButton.hidden = false;
  40. airPlayButton.disabled = false;
  41. break;
  42. case "not-available":
  43. airPlayButton.hidden = true;
  44. airPlayButton.disabled = true;
  45. break;
  46. }
  47. }
  48. );
  49. }
  50.  
  51. if (!window.WebKitPlaybackTargetAvailabilityEvent)
  52. return;
  53. var airPlayButton = document.getElementById("airPlayButton");
  54. var video = document.getElementById("video");
  55. airPlayButton.addEventListener('click', function(event) {
  56. video.webkitShowPlaybackTargetPicker();
  57. })
  58. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement