{"id":13655117,"url":"https://github.com/dbp/dnplayer","last_synced_at":"2026-01-17T22:55:24.303Z","repository":{"id":9597345,"uuid":"11517815","full_name":"dbp/dnplayer","owner":"dbp","description":"A simple player for Democracy Now! that remembers where you are.","archived":false,"fork":false,"pushed_at":"2014-11-05T17:57:54.000Z","size":164,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T14:50:20.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-19T01:43:16.000Z","updated_at":"2019-06-16T20:35:00.000Z","dependencies_parsed_at":"2022-09-18T11:40:54.124Z","dependency_job_id":null,"html_url":"https://github.com/dbp/dnplayer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbp%2Fdnplayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbp%2Fdnplayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbp%2Fdnplayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbp%2Fdnplayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbp","download_url":"https://codeload.github.com/dbp/dnplayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250416451,"owners_count":21426991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T03:00:58.047Z","updated_at":"2026-01-17T22:55:24.292Z","avatar_url":"https://github.com/dbp.png","language":"JavaScript","funding_links":[],"categories":["Tutorials and Blog Posts"],"sub_categories":[],"readme":"About\n-----\n\nThis is a really simple video player for the news program [Democracy\nNow!](http://democracynow.org). It always plays the most recent\nday's show, and will remember where you are. It can synchronize this\nacross devices; you just have to visit the url of the player you\ncreate at least once on each device. A demo of this is running at\n[lab.dbpmail.net/dn](http://lab.dbpmail.net/dn/).\n\nInstall\n-------\n\nThe backend is written with\n[Ur/Web](http://www.impredicative.com/ur/), with one minor patch to\nadd support for different tags[1]; if you install it, and sqlite, you\nshould be able to build it using the Makefile. Populate the sqlite\ndatabase with `sqlite3 dn.db \u003c dn.sql` and you should be able to start\nit with `./dn.exe`. The only target in the Makefile you will need to\nchange is deploy, for obvious reasons. And if you don't want to depend\nupon my server being up, or want to change the javascript, you might\nwant to host the .js file on your own, and change the script\ndeclarations in the .urp files.\n\n1. We need `\u003ccode\u003e` and `\u003cmeta\u003e` tags. If you edit `lib/ur/basis.urs`, add these lines:\n\n    val meta : unit -\u003e tag [Nam = string, Content = string] head [] [] []\n\n\n    val code : bodyTag boxAttrs\n\nCompatibility\n-------------\n\nRight now, the most stable target is Chrome (on computers). It works on\niPhones/iPads and Chrome on Android, but there may be a timing bug on\nslow connections. Firefox doesn't work because it doesn't support\nthe (proprietary) formats that DN! provides, and I haven't wired up\na Flash fallback (yes, I've tried JW Player, MediaElement, and Video.js.\nAll were buggy / didn't support in a browser agnostic way what I needed -\nit seems that until HTML5 video/audio stabilizes, the only way is to\ntarget browsers by hand).\n\nBugs\n----\n\nSort of a decision rather than a true bug, but to simplify the problem\nof certain browsers (I'm looking at you, mobile) having strange\npolicies about seeking (both when they allow it, and when the seeked\ntime is reflected in the currentTime), the backend only increases the\noffset it records (unless you are starting on a new day, of course).\nThis means that if you seek backwards manually in the show, this will\nnot be reflected if you reload or open it in another browser. Since\nthis is most likely a real edge case (most people watch sequentially,\nand if they do seek back, it is to listen to what was just played, and\nwon't likely switch devices / reload before they reach their old\nposition), and the issue of a mobile browser resetting the offset to 0\nbecause the currentTime hasn't been updated (though it should have\nbeen) is a big problem and something that would be noticed every time\nit happened, I think this is justified. But, really, it is a bug.\n\n\nFuture/Todo\n-----------\n\n* Figure out a fallback for browsers that don't support MP4/MP3 (ie, firefox).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbp%2Fdnplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbp%2Fdnplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbp%2Fdnplayer/lists"}